CSC 499 Grinnell College Fall, 2013-Fall, 2014  
Scribbler 2 Bluetooth
Communication
with C
Scribbler 2
 
 

Scribbler Byte-code Commands

According to Byte code descriptions,

According to Byte code descriptions, "the scribbler echoes back everything you send to it". However, some commands also echo back all 11 bytes of sensor data as well.

The following table details

Command Response Response Format
Command name Description byte 0
command
byte 1 byte 2 byte 3 byte 4 byte 5 byte 6 byte 7 byte 8 Command echoed Sensor data echoed # Bytes byte 0 byte 1 byte 2 byte 3 byte 4 byte 5 byte 6 byte 7
Retrieve Scribbler/Fluke version data    
GET_INFO Retrieve version info for Scribbler and Fluke 80 0 0 0 0 0 0 0 0 No No variable string ':' delimited string "Fluke version:robot version:scribbler version:model version"
Set/Retrieve Scribbler's name    
SET_NAME Set first 8 bytes of Scribbler's name 110 character 0 character 1 character 2 character 3 character 4 character 5 character 6 character 7 Yes Yes none
SET_NAME2 Set last 8 bytes of Scribbler's name 119 character 0 character 1 character 2 character 3 character 4 character 5 character 6 character 7 Yes Yes none
GET_NAME Get first 8 bytes of Scribbler's name 78 X X X X X X X X Yes No 8 character 0 character 1 character 2 character 3 character 4 character 5 character 6 character 7
GET_NAME2 Get last 8 bytes of Scribbler's name 64 X X X X X X X X Yes No 8 character 8 character 9 character 10 character 11 character 12 character 13 character 14 character 15
Tone generation    
SET_SPEAKER Generate Tone (beep) 113 duration (int millesec) frequency (int millesec) -1 X X X Yes Yes none
high 8 bits low 8 bits high 8 bits low 8 bits
SET_SPEAKER_2 Generate 2 Tone (beep 2/duet) 114 duration (int millesec) frequency1 (int millesec) frequency2 (int millesec) -1 X Yes Yes none
high 8 bits low 8 bits high 8 bits low 8 bits high 8 bits low 8 bits
Scribbler Movement Commands    
SET_MOTORS Instruct left & right motors 109 left power (0-99 backwards, 100 stop, 101-200 forward) right power (0-99 backwards, 100 stop, 101-200 forward) -1 X X X X X Yes Yes none
SET_MOTORS_OFF cut power to motors 108 -1 X X X X X X X Yes Yes none
Scribbler Sensor Commands    
GET_LIGHT_ALL Determine all 3 light sensor values 70 X X X X X X X X Yes No 6 left sensor middle sensor right sensor
high 8 bits low 8 bits high 8 bits low 8 bits high 8 bits low 8 bits
GET_LIGHT_LEFT Determine left light sensor value 67 X X X X X X X X Yes No 2 left sensor
high 8 bits low 8 bits
GET_LIGHT_CENTER Determine center light sensor value 68 X X X X X X X X Yes No 2 center sensor
high 8 bits low 8 bits
GET_LIGHT_RIGHT Determine right light sensor value 69 X X X X X X X X Yes No 2 right sensor
high 8 bits low 8 bits
GET_IR_ALL Determine both IR sensor values 73 X X X X X X X X Yes No 4 left sensor right sensor
high 8 bits low 8 bits high 8 bits low 8 bits
GET_IR_LEFT Determine left IR sensor value 72 (Scribbler documentation says code 71) X X X X X X X X Yes No 2 left sensor
high 8 bits low 8 bits
GET_IR_RIGHT Determine center light IR value 71 (Scribbler documentation says code 72) X X X X X X X X Yes No 2 left sensor
high 8 bits low 8 bits
GET_LINE_ALL Determine both line sensor values 76 X X X X X X X X Yes No 4 left line sensor right line sensor
high 8 bits low 8 bits high 8 bits low 8 bits
Fluke Movement Commands    
SET_FORWARDNESS Set default robot direction 128 direction (0—scribbler forward, 0x80—fluke forward) 2 byte Fluke command No No none
SET_STALL Determine if robot has stalled (unable to move forward) 79 1 byte Fluke command Yes No none
GET_FORWARDNESS/ GET_SERIAL_MEM Determine forwardness 90 page 0 in memory offset 0 in memory 5 byte Fluke command Yes Yes 1 1—scribbler forward, 0—fluke forward)
high 8 bits low 8 bits high 8 bits low 8 bits
Set Fluke LEDs    
SET_DONGLE_LED_ON Turn on front dongle LED 116 1 byte Fluke command Yes No none
SET_DONGLE_LED_OFF Turn off front dongle LED 117 1 byte Fluke command Yes No none
DIMMER_LED Set rear dongle LED to 0-255 126 intensity (int 0-255, <160 not visible) 2 byte Fluke command Yes No none
Dongle Sensors    
SET_DONGLE_IR cut power to motors 120 power (0-255) X X X X X X X No No none
GET_DONGLE_L_IR Determine left IR Dongle sensor value 85 1 byte Fluke command No No 2 left sensor
high 8 bits low 8 bits
GET_DONGLE_C_IR Determine center IR Dongle sensor value 86 1 byte Fluke command No No 2 center sensor
high 8 bits low 8 bits
GET_DONGLE_R_IR Determine right IR Dongle sensor value 87 1 byte Fluke command No No 2 right sensor
high 8 bits low 8 bits
GET_BATTERY Get battery voltage 89 1 byte Fluke command Yes No 2 Voltage
high 8 bits low 8 bits
Dongle Sensors    
SET_PIC_SIZE set size of image for Fluke 2 camera 11 71 for 266 (height) by 427 pixels;
213 for 800 (height) by 1280 pixels
X X X X X X X No No none
      http://www.cs.grinnell.edu/~walker/bluetooth-with-c/scribbler-commands.shtml

created 20 June 2013
revised 27 November 2013
last revised 16 February 2016
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.