Professional Documents
Culture Documents
[Type the abstract of the document here. The abstract is typically a short summary of the contents of the document. Type the abstract of the document here. The abstract is typically a short summary of the contents of the document.]
Message Recipients:
1 2 3 4 5 6 7 8 Figure Byte1
0: IOIO board will receive the message 1: Internal devices will receive the message
Message Recipient Using this approach the message could be sent to one of the two recipients.
Commands:
IOIO Commands: Commands used to control the IOIO: 1. 2. 3. 4. 5. 6. 7. 8. 9. Define Analog Port Define Digital Port Define PWM Port Get Digital Port Get Port Voltage Release Port Set Digital Port Set Pulse Width Soft Reset
Mobile Internal devices Control Messages: Commands used to control the mobile internal devices (camera, gyroscope sensor, accelerometer, and gps) like initializing them, reset them, testingetc.
Message Data:
52
Message Recipients
Commands
Message Data bits are used for passing the parameter for the IOIO commands and mobile internal devices commands. The IOIO consists of 48 pins; each pin will be represented in one byte. We will need 48 bytes for message data. Those 48 bytes can also be used for Internal Devices data.
Control bit
Data bits
Control bit=0: The pin isnt selected to execute the command on it. Control bit=1: The pin is selected to execute the command on it. Data bits are used for analog, digital, or PWM output data.
IOIO Commands:
Command Message[1] IOIO/Internal Device Soft Reset () 0 Message[2] Message[3] Command Number 0 Command Parameter Message[4] Command Parameter Message[552] Message Data
Set the corresponding byte of the pin to be analog by 128 (control bit=1)(Ex: Pin3 Message[7]=128) Set the corresponding byte of the pin to be digital by 128
Port Direction
Port Mode
Port Mode
Set the corresponding byte of the pin to be PWM by 128 Set the corresponding byte of the pin to be get digital value from by 128 Set the corresponding byte of the pin to be get port voltage from by 128 Set the corresponding byte of the pin to be released by 128 Set the corresponding byte of the pin to set by digital value by 128 + Digital value Set the corresponding byte of the pin to set by pulse width value by 128 + Pulse Width value
Release Port(PortNum
ber)