This is something that would have helped me a lot for my obstacle-avoidance project. The traffic light does a good job setting up what a state-machine is, but never touches on the need for gate-* to feed inputs on nodes that control Arduino pins. I still don’t understand why h-bridge needs the PWM pin gated, but not the others. Maybe what I’m looking for is more of a technical documentation than a tutorial…
Adding a servo device that works on state-machines would also be helpful (like the servo-enable I created with an enable pin that does attach/detach, but I don’t think that would be a very good solution for a robot arm that cannot just let the servo free-wheel between changes).
I guess an alternate way of using state-machine might be to have all the nodes with control pins on the main patch and work out some way to change the inputs over time (likely with select-* nodes, but that could get messy fast…). That’s probably more a complicated feed-back loop than a state-machine, though.
Now I’ve got myself wondering how to implement traffic lights for 2 directions…and of course how to add optional left-turn lights… There’s always brute-force with delays for green & yellow and always turn on red light if any other direction has yellow or green, but there should be a cleaner way. Even using state machine and having to add all the red lights for other directions to each yellow & green light seems clumsy.
BTW: the built-in tutorial on 1st startup was very nice. It might be a down-side that it provided enough info that I didn’t bother reading any other introductory documentation and jumped straight to the traffic light example & wondered where to go from there The only introductory thing I’ve found that isn’t in the tutorial is how to pan around the work-space area. Tossing that into the tutorial (or adding scroll bars) might be nice.