Stream
Opcode: 148
This command starts a continuous stream of data packets.
The list of packets requested is sent every 15 ms, which is
the rate iRobot Create uses to update data.
This is the best method of requesting sensor data if you
are controlling Create over a wireless network (which has
poor real-time characteristics) with software running on a
desktop computer.
• Serial sequence: [148] [Number of packets]
[Packet ID 1] [Packet ID 2] [Packet ID 3] etc.
• Available in modes: Passive, Safe, or Full
• Changes mode to: No Change
• Stream data byte 1: Number of packets requested
(0 - 43)
• Stream data bytes 2 - N: IDs of packets requested
(0 - 42)
The format of the data returned is:
[19][N-bytes][Packet ID 1][Packet 1 data...]
[Packet ID 2][Packet 2 data...][Checksum]
N-bytes is the number of bytes between the n-bytes byte and
the checksum.
The checksum is a 1-byte value. It is the 8-bit complement
of all of the bytes between the header and the checksum.
That is, if you add all of the bytes after the checksum, and
the checksum, the low byte of the result will be 0.
Example:
To get data from Create's left cliff signal (packet 29)
and Virtual Wall detector (packet 13), send the following
command string to Create:
[148] [2] [29] [13]
NOTE: The left cliff signal is a -byte packet and the IR
Sensor is a 1-byte packet.
Create starts streaming data that looks like this:
19
5
29
2
header n-bytes packet
Packet data
ID 1
1 (2 bytes)
NOTE: Checksum computation: (5 + 9 + + 5 + 13 + 0
+ 18) = 56 and (56 & 0xFF) = 0.
iRobot Create Open Interface (OI) Specification
Data Bytes: N + 1,
where N is the number
of packets requested.
25
13
0
182
packet
packet
Checksum
ID 2
data 2
(1 byte)
In the above stream segment, Create's left cliff signal value
was 549 (0x0225) and there was no virtual wall signal.
It is up to you not to request more data than can be sent at
the current baud rate in the 15 ms time slot. For example,
at 57600 baud, a maximum of 86 bytes can be sent in 15 ms:
15 ms / 10 bits (8 data + start + stop) * 57600 = 86.4
If more data is requested, the data stream will eventually
become corrupted. This can be confirmed by checking the
checksum.
The header byte and checksum can be used to align your
receiving program with the data. All data chunks start with
19 and end with the 1-byte checksum
Pause/Resume Stream
This command lets you stop and restart the steam without
clearing the list of requested packets.
• Serial sequence: [150][Stream State]
• Available in modes: Passive, Safe, or Full
• Changes mode to: No Change
• Pause/Resume Stream data byte 1: Requested
stream state (0 - 1)
An argument of 0 stops the stream without clearing the list
of requested packets. An argument of 1 starts the stream
using the list of packets last requested.
Opcode: 150
Data Bytes: 1
14
Need help?
Do you have a question about the CREATE - OPEN INTERFACE and is the answer not in the manual?