Skip to content

Instantly share code, notes, and snippets.

@ddefb
Last active March 7, 2019 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddefb/9f5c474df683ea3f4f1a6e75585535b0 to your computer and use it in GitHub Desktop.
Save ddefb/9f5c474df683ea3f4f1a6e75585535b0 to your computer and use it in GitHub Desktop.
node motor(c: bool) returns (mode, velocity: int)
let
automaton
state FORWARD do
mode = 1;
velocity = 255;
unless not c then BACKWARD
state BACKWARD do
mode = 2;
velocity = 255;
unless c then FORWARD
end
tel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment