G-code commands in sequence builder

I think it would be great to be able to write gcode commands in the sequence editor. This way it would be simple to add servos and other equipment for custom functionality. I reckon this couldn’t be a big challenge to implement programming-wise? Just add a tab for gcode in the command window and have a field for typing the raw gcode.
I think this would really please makers and people who want to add their own stuff to their farmbot. :slight_smile:

1 Like

Interesting idea, Martin.

We don’t support it at the moment, but I can see how that could be useful in the future. With the current GCode, you can still get most of what you need to do done using “Read Pin”, “Write Pin”, “Move Relative” and “Move Absolute”.

From what you’re asking though, it sounds like you might want to give the “peripherals” feature a look. It’s a very new feature that hasn’t been deployed to production yet (but can be previewed at http://staging.farmbot.io).

Thanks for the suggestion!

1 Like

Thanks for the tips, Rick. I have now tried the peripherals feature and it works very well for on/off toggling for things like valves and lights. I do notice though that by taking the same pin that I used in the peripherals feature (D10) and trying to use it in the sequence builder it has no effect at the moment. So looking forward to getting the sequence builder working, and especially for servos. :wink:
You’re right that you should be able to get most things done by using the functions already in the sequence builder. But it practice it might be handy to also be able to utilize some gcode commands. Not as user friendly though.

Great to hear, Martin. We will investigate the issue you’re having.

Also, in regards to having servos, have you tried writing to the pin and setting “MODE” to 1 in the sequence editor? That might work for some brands of servo.

We will polish that up into a drop down that says “DIGITAL” and “ANALOG” within the month, but it should be working despite the cosmetic issues.

1 Like

This didn’t work for me earlier. But now trying with os version 2.1.4 on my.farmbot.io (not staging, couldn’t log in for some reason), I can build and execute sequences for both a valve (on/off) and servos (pwm). Works from chrome browser on my phone and computer.
Grats :grinning:

@Martin Great to hear! I’m glad everything worked out.

As far as staging goes: we’re doing some big changes related to HTTPS://, so things are unstable on staging at the moment. Once things stabilize, it should be back to normal.

1 Like