Digital Bug Commands

 

Commands Parameter Action Returns
a 1 through 8 reads pin 1 or 0 (text with newline)
b   reads all 8 pins 0 - 255 (text with newline)
i 1 through 8 toggle pin  
j 1 through 8 write pin low  
k 1 through 8 write pin high  
l* 0 - 255 byte write (text)  

*letter "l" was a bad choice for clarity. It will be "m" in the next version.

Example ArtBus digital bug commands:

a = read a pin
send: !Aa3;
what happens: on board number "A" line 3 is read and a 1 or 0 followed by a newline is returned.

b = read all 8 pins as a byte
send: !Ab;
what happens: on board number "A" all 8 lines are read as binary. The result is returned as a decimal number from 0 to 255  followed by a newline (like this: "2 5 5 newline").

 i = toggle a pin
send: !Ci2;
what happens: on board number "C" , line 2 is toggled. This means that if line 2 is high, make it low, and if it is low, make it high.

j = write pin low
send: !Aj2;
what happens: on board number "A" , line 2 is set to low.

k = write pin high
send: !Bk5;
what happens: on board number "B" , line 5 is set to high.

l = write a byte in binary
send: !Cl170;
what happens: on board number "C" , the binary form of the number 170 is outputted. This looks like 10101010.  Sending 85 would look like this: 01010101.