This builds on the simple traffic light tutorial on the XOD documentation page & assumes users have already been through that tutorial. It steps through the process of how to figure out what to put into patches/nodes and works up to a more advanced state-machine for controlling a traffic light for cross traffic plus turn lane with traffic sensors.
I made a pretty significant re-write just before posting, so let me know if you find errors, comments that don’t match code, additional points that should be brought out, or you think of a better way to present something.
With recent major updates to XOD, it is probably time to re-write this tutorial. Anyone have suggestions for changes besides replacing obsolete nodes?
My main thought is to add mutex as a solution to bug mentioned at the end and including another patch to show that solution. Should mutex be added at the end, or brought in to create a state-machine as soon as is reasonable?
Are the dead-end paths helpful in understanding the process, or just confusing and should be eliminated?
Any points that are unclear, or too wordy?
Any solutions that should be added besides mutex & bus?
I think mutexes would fit nicely here. Dead-end paths are quite useful IMO because the negative experience is a useful experience too.
Disclaimer: I started to write a guide article about mutexes and state management using a traffic light as an example. Maybe there will be some content duplication
So sad. Apparently nobody has reviewed this since the libraries were linking back to my local copies of nodes instead of to the library copies…
Anyway…it has been updated to work with XOD 0.32.1… I tried to do a little cleanup and minor clarifications while I was editing and I’ve added examples for mutex, bus, and jumpers.
I had problems saving and had to re-code my changes several times; hopefully I didn’t miss anything. I need to rebuild my hardware to verify mutex example. Let me know if you find any issues or have suggestions to make things better. I’ve already spent 6 hours on it & I’m done for today…