======================= ROV Minimalist Protocol ======================= :Organization: `Project SCINI `__ at `Moss Landing Marine Labs `__ :Date: December, 2007 :Disclaimer: This material is based on work supported by the National Science Foundation under Grant No. ANT-0619622 (http://www.nsf.gov). Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation. :Version: This protocol will be designated as SCINI Mark Ic. All packets sent to the microcontroller should, but do not have to be, terminated with a line feed. All packets returned from the micro will be terminated with a line feed and cartridge return ('\n\r'). The escape character (0x1B) sent to the micro will clear any started transmission. Null characters are always ignored with no response but should not be inserted in the middle of a transmission. An enquiry character (0x05) will return an acknowledge packet (0x06). All hex values should have digits or lowercase characters only; a packet containing other hex characters will be accepted but ignored. Packets ------- 'N' is a digit (0,9); 'X' is a lowercase hex character (0,f). ========= =================================================== Format Definition ========= =================================================== i identify, returns an alive character ('.', 0x2E) I identify, returns an identification string sNNXX set variable NN to hex value XX gNN get variable NN, returns vNNXXXX !!! enter interactive mode ========= =================================================== Variables --------- ======== ============================================================= Number Definition ======== ============================================================= 00 to 09 PWM outputs; 00 to 05 are for motor controllers and bounded to valid servo control values; 06 to 07 are for light dimming etc and the value determines the proportion of time the output pin is set high. Getting these returns the current value, setting them sets the output value, bounded to 8-bit (0,255). 10 to 19 Analog inputs; setting these has no effect, getting them returns the most recently read value, bounded to 10-bit (0,1023). 20 to 29 Smoothed analog inputs; setting these to any value clears the averaging, reading returns a smoothed value for the corresponding input channel. 50 to 69 Digital outputs; when read returns 0x00 or 0x01 corresponding to current state, when set 0x00 is off and anything else on. 50 Lasers 51 LED lights 70 to 89 Digital inputs; when read returns 0x00 or 0x01. Setting does nothing. Read at time of request. 90 to 99 Undefined ======== ============================================================= Interactive Mode ---------------- This mode allows simple debugging of the program state, easier setting and reading of variables, etc. Undocumented at this point; try entering this mode and typing 'h' or '?'.