Cerebellum serial interface

Tristate digital IO pins RB0,1,2,4,5?
Switch digital to analog?

All received commands will be converted into uppercase before processing, so command processor becomes case insensitive.

SV[n] [+|-]m [+|-]m ...
SV5 30
servo 5 to position 30
SV0 +10
servo 0 increment by 10
SV7 -67
servo 7 decrement by 67
SV 5 +4 -12
servo 0 to position 5, servo 1 increment 4, servo 2 decrement 12
SV 0 0 0 0 +15 -27 +2 50
servos 0 thru 3 disable, servo 4 increment 15, 5 decrement 27, 6 increment 2, 7 position 50
- returns OK or ERROR

DBn d [d ...]
DB3 15 27 230 0
open i2c communications to daughterboard 3
send data bytes 15, 27, 230, 0
- returns daughterboard response or OK or NACK or ERROR
	- OK if daughterboard ACKs on address byte and no data bytes
	- daughterboard response if databytes were sent
	- NACK if NACK received over i2c

CC"foo"[Rn]
CC"blah"
send command blah to camera
CC"blah"R4
send command blah to camera, read 4 lines of output
CCR1
read 1 line of output from camera
- returns camera response or ERROR or NACK
	- NACK if no response from camera

ANn		read analog input (n:0..7)
- returns 0..255 or ERROR

DIn		read digital input
tristate pin to input and read value
- returns 0 or 1 or ERROR

DHn		set digital output hi
tristate pin to output and set to hi
- returns OK or ERROR

DLn		set digital output lo
tristate pin to output and set to lo
- returns OK or ERROR

Response:
OK : command executed
ERROR : problem parsing command string
NACK : daughterboard communication error


set_servo(n,char*)
interprets char* for servo n

cam_tx(char*)
sends char* to camera with " as delimiter

cam_rx(n)
reads n lines from camera

