updated traffic lights note
[wikirepo] / notes / traffic_lights / state_machine.dot
diff --git a/notes/traffic_lights/state_machine.dot b/notes/traffic_lights/state_machine.dot
new file mode 100644 (file)
index 0000000..316cd76
--- /dev/null
@@ -0,0 +1,12 @@
+digraph G
+{
+  init -> red_init;
+  red_init -> red_wait;
+  red_wait -> redamber_init [label="timeout || button press"];
+  redamber_init -> redamber_wait;
+  redamber_wait -> green_init [label="timeout || button press"];
+  green_init -> green_wait;
+  green_wait -> red_init [label="timeout || button press"];
+  green_wait -> sleep [label="awake timeout"];
+  sleep -> init [label="button press"];
+}