CMD A VALA B VALB
0000 0000 0000 0000 0000 0000 0000 0000
\ / \ / \ / \ / \ / \ /
SET DIO 5 VAR 4 ignored
- A,B are one of DIO, AO, PWM, TMR, user variable, value
- VALA, VALB are numbers for indexes, or 0 if A,B are not arrays
- If A,B are user variable, then we need one byte for which variable,
so how to do user array?
- Can't fit values greater than 1 byte, i.e. how to do SET DIO[1], 256
Could fit 12-bit variables by using extra byte for VALB
CMD A VALA
0000 0000 0000 0000 0000 0000 0000 0000
\ / \ / \ / \ /
GET USR 5 ignored
- USR meaning user variable
CMD VAL
0000 0000 0000 0000 0000 0000 0000 0000
\ / \ /
WAIT 5
CMD A VALA B VALB OP
0000 0000 0000 0000 0000 0000 0000 0000
\ / \ / \ / \ / \ / \ /
IF PWM 5 VAR 3 >
- IF PWM[5] > var3
- Or using 12 bits for VALB:
CMD A VALA B VALB
0000 0000 0000 0000 0000 0000 0000 0000
\ / \ / \ / \ / \ /
OP PWM 5 VAR 3
- OP one of >, >=, ==, <=, <
- If evaluates to True, execute next line (will be GOTO), otherwise
skip it
CMD ADDR
0000 0000 0000 0000 0000 0000 0000 0000
\ / \ /
GOTO 3