Thomas Bräunl, May 2019
Connect the IO7 board via the micro-USB connectors to an embedded controller, Mac, Windows or Linux PC. If you wnt to use the motor or servo drivers, you have to connect an external battery or power supply (do not power from USB in that case).
h help print list of commands none O Output text output in verbose mode O <verbose> - verbose [0 ...1] Ex. O 0 (turn off verbose mode) E demo will drive robot along a path none and print relevant sensor data m motor set motor speed (uncontrolled) m <motor> <speed> - motor [1..4] - speed [-100 .. 100] Ex.: m 1 50, m 2 -100 M motor set motor speed (controlled) M <motor> <ticks> - motor [1..4] - ticks per 1/100 sec. [-128 .. +127] will automatically enable PID control d PID set PID parameters d <motor> <p> <i> <d> - motor [1..4] - p, i, d [0..255] PID parameters Ex.: p 3 4 1 1 s servo set servo position s <servo> <position> - servo [1..14] - position [0..255] Ex.: s 2 200, s 10 0 S servo set servo limits S <servo> <lower> <Upper> - servo [1..14] - lower, upper [0..255] in ms/100 lower & upper specify servo signal uptimes position values 0 (lower) and 255 (upper) p PSD read PSD distance sensor p <sensor> sensor [1..6] Ex.: p 5 (returns 2 Byte value, analog) e encoder print encoder value e <encoder> encoder [1..4] Return: 2 Byte value Ex. e 4 v version print version number none Return: 4 Bytes (characters) V voltage print supply voltage level none Return: 2 Byte value [V/100] i input read digital input port i <port> port [0..15] Ex.: i 5 I input read ALL digital input ports none Return: 2 Bytes o output set digital output port o <port> <bit> port [0..15], bit [0..1] Ex.: o 7 1 c config set i/o port configuration c <port> <state> port [0..15], state [i, o, I, J] i=input, o=output, I=in+pull_up, J=in+pull_down default i/o [0..7] = I, [8..15] = o Ex.: c 14 i; c 2 o a analog read analog input a <port> port [0..8] a0 is supply voltage, a8 is microphone input a1..a7 are free pins on board. Max. 2.7V Return: 2 Byte value [V/100] Ex.: a 5 r record record analog input r <port> <iterations> port [0..14] 0 is supply volt., 1..7 pins, 8 is microphone, 9..14 are PSD1..PSD6 iterations [1..2048] at 1kHz Ex.: r 8 1000 record for 1sec microphone input R read read recorded analog values none transfers previously recorded byte values Ex.: R l led set led status l <led> <bit> led [1..4], bit [0..1] Ex.: l 2 1 t time print 100Hz timer counter none Return: 4 Byte value T timer set timer frequency T <timer> timer [1..100] set timer in [10Hz] Ex.: T 100 for 1'000Hz u upload set board into USB-upload mode none for software upgrade w v-omega init v-omega driving w <tick> <base> <max> <dir> always uses motors M1(left and M2(right) - ticks per m [1..65'535] (2 Bytes) - base width in mm [1..65'535] (2 Bytes) - max speed in cm/s [1..65'535] (2 Bytes) - dir [1..4]: 1= M1-counter-clock & M2-clockwise; 2=clock&counter; 3=clock&clock; 4=counter&counter Ex.: w 20 75 200 1 (for 20 ticks/dm, 75mm base, 2m/s max, cnt/clock) W v-omega stop v-omega driving none A v-omega change v-omega parameters A <vv> <tv> <vw> <tw> - vv, tv, vw, tw [0.255] proportional/ integral parameters for v-omega controller, v typically around 7 (parameter 70) [1/10], t typically around 0.2 (param. 20) [1/100] Ex.: A 70 30 70 10 (for vv=7, tw=0.3 vw=7, tw=0.1) x driveV set vehicle speed x <linear> <angular> - linear speed in cm/s [-32'768..+32767] (2 Bytes) - angular speed in rad/10s [-128..127] (1 Byte) Ex.: x 100 0 for straight 1m/s x 50 1 for curve to forward left 5.7°/s X driveV get vehicle speed none print linear speed [cm/s] (2 Bytes) and angular speed in rad/10s (1 Byte) Return: 3 Byte value q pose get vehicle pose none print x, y, phi in [mm] and [100rad] (2 Bytes each) initially all set to 0 Return: 6 Bytes Q pose set vehicle pose Q <x> <y> <phi> - x,y in mm [-32768 .. 32767] (2 Bytes) - phi in 100rad [-314 .. 314] (2 Bytes) Ex.: Q 200 100 157 (x=0.2m y=0.1m, phi=90°) y driveS drive straight y <speed> <distance> - speed in mm/s [0..65535] (2 Bytes) - distance in mm [-32768 .. 32767] (neg. for backwards, 2 Bytes) Ex.: y 100 -1000 for 1m backwards y 1000 1000 for 1 m fast forward Y driveS drive turn y <rot_speed <angle> - rot_speed in 0.1*rad/s [0..65535] (2 Bytes) - angle in 0.1*rad [-32768 .. 32767] (positive=counter-clock, 2 Bytes) Ex.: Y 1000 -6284 full clockwise rotation (2*Pi) C driveC drive curve C <speed> <distance> <angle> - speed in mm/s [0..65535] mm (2 Bytes) - distance in mm [-32768 .. 32767] (neg. for backwards, 2 Bytes) - angle in 0.1*rad [-32768 .. 32767] (positive=counter-clock, 2 Bytes) Ex.: C 1000 2071 1000 1m forward with 90 deg (Pi/4) counter-clock z driveR drive remaining none return remaining distance to goal (0 if reached) in mm or radians Return: 2 Byte value Z driveD drive done or stalled none return 1 if previous drive is finished, otherwise 0 L stalled check if a motor has stalled none return 0 if no motor has stalled return stall-bit-values for Motors[1..4], e.g. 0b1111 = all motors stalled
Thomas Bräunl, Franco Hidalgo, Remi Keat 2015