Page 69
KIPR Link iRobot Create Library Functions
Create serial interface functions
create_clear_serial_buffer [Category: Create Serial Interface]
Format:
void
create_clear_serial_buffer ();
Clears the internal serial interface buffer of any unaccessed send/receive data.
create_connect [Category: Create Serial Interface]
Format:
int
create_connect();
Establishes a USB serial connection between the KIPR Link and a Create module. This statement
is normally paired with an
msleep
statement, since it takes more than one second for the
communications link to stabilize (
msleep(1500)
is sufficient). If the program is paused and the
Create is not turned on, the function will block continued execution until the Create is turned
on. This function is always the first step for sending Create Open Interface commands from the
KIPR Link to the Create. By default, the Create starts in
create_safe
mode.
create_disconnect [Category: Create Serial Interface]
Format:
void
create_disconnect();
Restores the Create to power on configuration (which will also shut off any running motors).
create_read_block [Category: Create Serial Interface]
Format:
int
create_read_block(
char
*data,
int
count);
Uses the serial interface to have the Create send the number of bytes specified into the
character string
data
. 1 is returned on read success, 0 on failure.
create_write_byte [Category: Create Serial Interface]
Format:
void
create_write_byte (
char
byte);
Uses the serial interface to have the KIPR Link send the byte to the iRobot Create.
Create configuration functions
create_full [Category: Create Configuration Function]
Format:
void
create_full();
Create will move however you tell it (even if that is a bad thing). In particular, the Create will not
stop and disconnect if a wheel drop or cliff sensor goes high.
create_passive [Category: Create Configuration Function]
Format:
void
create_passive();
Puts Create into passive mode (motor commands won't work).
create_safe [Category: Create Configuration Function]
Format:
void
create_safe();
Create will move however you tell it (even if that is a bad thing). In particular, the Create will not
stop and disconnect if a wheel drop or cliff sensor goes high.
Содержание KIPR Link
Страница 1: ...KIPR Link Manual Version BB2014 1 1...