Fine-tuning Gamepad Jog Speed

Hey Greg,

creating a toolpath and loading it into machine, yes. But simply typing

“G91 G1 X5 F3”

(=assuming a cut of 5 inches at 3 ipm)

I don’t see what can suck there, in case you have a keyboard connected to your controller (what I strongly recommend, since a virtual keyboard on a touch screen, THAT is what really sucks).

Not really looking for a debate on my process, just was wondering if the speeds can be custom mapped to the controllers.

I do not have a Onefinity controller, but have an idea for a creative and potentially successful temporary fix…

It looks like only X and Y travel are required, so could you create a custom machine (I thought I remembered seeing that it is possible to do this), and modify the motor parameters to ‘trick’ the axes to going slower (not sure how the controller handles this or what is available to modify). You could save it as “Foam cutting”, then just load it when needed?

Not sure if any of that is possible :grinning:

1 Like

Hey Greg,

I assumed you just move X. Do you need to move any of the other axes too to make such cuts?

Was wondering fi there was a way to trick the motors into responding at a percentage of the speed. Its a good thought

Just x, but most of the time I am on the opposite side of the table holding the work down and sliding it forward, so with the wireless controller in my hand I have access to the cut without losing register on the part I’m holding… I just ran the numbers and I have 10,080 separate pieces to cut from 14 different master shapes that all have precise angles. they fit together to create the topology across a 12 foot sphere. Any time I can save not running around entering code re-fixturing cuts is going to help.

Hey Greg,

Maybe I’m assuming too much about myself. For me, using a computer keyboard became the easiest thing I do in my daily life already a long time ago, both for personal and professional reasons, and I often do it for 15 hours at a time. But I write by using two-handed touch typing, have excellent keyboards, use an ergonomic keyboard layout and write as fast as many persons speak. Maybe that’s why I think my suggestion is the simplest solution.

But maybe it is the best solution to find and to change the values in the code of the onefinity-firmware, or better, to add to the user interface a way for the operator to be able to change these values. But I don’t use this controller, so it’s not worth it for me.


Okay, okay. On the Onefinity Controller, you open a terminal window (either hold down “Ctrl” and then click “T” and then “C” (type “exit” to exit again)) or you log in with a ssh (user: bbmc, password: onefinity), and then do:

sudo -i
cd /usr/local/lib/python3.5/dist-packages/bbctrl-1.0.9-py3.5.egg/bbctrl/
nano Jog.py

There, you find:

    def changed(self):
        scale = 1.0
        if self.speed == 1: scale = 1.0 / 128.0
        if self.speed == 2: scale = 1.0 / 32.0
        if self.speed == 3: scale = 1.0 / 4.0

The “Low speed” is speed 2.

Inside nano, after you have made your modifications as desired, you do <Ctrl>-O, <Enter>, <Ctrl>-X, and then back on CLI you type

reboot

EnJoy :slight_smile: !

PS: I don’t like nano, but it is installed.

Further reading

3 Likes

Nice, this is great! Def going to try it out.

Its not a matter of typing vs controller, more an issue that “I am the fixture jig” standing behind the machine holding down a warped piece of scrap that I dont want to change the pressure on by going back over to the screen. I will probably enter in code for the longer strips but I end up with all this scrap that I dont want to individually fixture.

Hey Greg,

I understand. Thanks for showing what you do!

Happy to, its a crazy build for sure. This is 1/6 scale study model. The final will be 14 feet tall after all the fiberglass and cement work.


I bought the Onefinity just to do the framework, but figured I could hack it to do the foam also.

4 Likes

so close… but it gives me a no permission error when I try to save changes
what did I do wrong?

did you enter the “sudo -i” command first,if successful the prompt would have changed from a $ to a #

1 Like

I did the first time but had something typed wrong in the directory, and on my second attempt I forgot that part… duh. That was probably it. Thanks

so I was going to find out by experimenting but is it (1.0 / 4.0) meaning 1 is 100 percent and you are dividing it by 4 or are you replacing the 1 increment with 4?

Hey Greg,

this is a division. To try out the behaviour I changed the 32.0 first to 512, rebooted, tested (green lower button on gamepad), and then I changed the value to 1, rebooted, tested again by moving one of the axes with the gamepad. The behaviour after pressing the green button was in the first case that the speed was 1/4th of the “ultra slow” speed, with the latter value it was as fast as the “full speed” button. So if you said the “low speed” is too low, you could decrease the 32.0 to a value below it in order to increase the speed.

Instead of increasing the speed that the green button activates (speed 2 in the code), you can of course also decrease the speed the red button activates (speed 3).

By the way, when typing in long paths like /usr/local/lib/python3.5/dist-packages/bbctrl-1.0.9-py3.5.egg/bbctrl/, you can make use of the auto-complete function of bash by typing only /usr/ and the next letter l, and then the Tab key twice, then it shows you possible completions, and you again simply type the next letter, and this way repeatedly until the path is complete.
To read the full bash manual, type the command man bash (←or click here).

1 Like

That was it, thanks so much. I changed the 2 scale to 1.0 / 15 and it hit my speed perfectly. super thin kerf with just a hair of deflection in the wire.

1 Like

Thanks, that is faster than getting full string right every time:)

2 set at 1.0 / 15.0 feels like about a F 600 in millimeters. so I guess the default is something like F 50 in inches

1 Like

Hey Greg,

when set to metric, without modification, “full speed” is 10 m/min, “high speed” is 2.5 m/min, , “slow speed” is 0.31 m/min, and “ultra slow” is 0.08 m/min. Setting the value in the division to 512 made 0.02 m/min.

What do you think of changing the thread’s title to “Fine-tuning Gamepad Jog Speeds” or “Fine-tuning hack of Gamepad Jog Speeds”?

2 Likes

Or maybe even “feeds” instead of “speeds” to keep consistent with CNC terminology?

I also have to just say this project you’re working on @Brotron might just be the coolest thing I’ve seen a 1F used for. Hope you’re able to share the finished project someday. Would even be amazing to see continued updates as it progresses to show others what’s possible with big ideas.

1 Like

Hey Greg @Brotron, hey Jace,

I would rather say anything that you make Greg is absolutely stunning. I feel honored to have helped you, even it was only with such a small contribution.

Thank you, that’s very kind. And your info helped amazingly. I rarely find a direct and exact fix when I need something to work outside of a supplied software interface. I wanted a speed of 650 mm/min, so I divided 10,000 by 650 and got 15.38. My guestimation “without knowing the full speed value” was 15, which was mostly luck btw:)

Quick math and conversions for anyone that is confused about getting an exact feed rate from the controller.

def changed(self):
    scale = 1.0
    if self.speed == 1: scale = 1.0 / 128.0
    if self.speed == 2: scale = 1.0 / 32.0
    if self.speed == 3: scale = 1.0 / 4.0

The 1.0 in the code is the full speed value = 10 meters per minute
the code line for low speed (bottom green button) is: (if self.speed == 2: scale = 1.0 / (n))
(n) being the variable to change in the code

Formula to change feed rate, meters per minute:
10 divided by the desired feed rate = (n)

Formula to change feed rate, millimeters per minute:
10,000 divided by the desired feed rate = (n)

Formula to change feed rate, feet per minute:
32.8 divided by the desired feed rate = (n)

Formula to change feed rate, inches per minute:
393.7 divided by the desired feed rate = (n)

2 Likes