Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
irobotActuator.h File Reference
iRobot Create actuator functions. More...
Go to the source code of this file.
Functions | |
| int32_t | irobotDigitalOutputs (const irobotUARTPort_t port, const uint8_t output) |
| Write to the digital output bank of the cargo bay on iRobot. | |
| int32_t | irobotDriveDirect (const irobotUARTPort_t port, int16_t leftWheelSpeed, int16_t rightWheelSpeed) |
| Directly actuate left and right wheels. | |
| int32_t | irobotDriveDirection (const irobotUARTPort_t port, int16_t velocity, const irobotDirection_t direction) |
| Drives in a fixed direction. | |
| int32_t | irobotDriveRadius (const irobotUARTPort_t port, int16_t velocity, int16_t radius) |
| Drive the robot with a fixed linear speed, and turning through a fixed radius. | |
| int32_t | irobotLEDs (const irobotUARTPort_t port, const irobotLED_t leds, const uint8_t powerColor, const uint8_t powerIntensity) |
| Change the state of the iRobot power, play, and advance LEDs. | |
| int32_t | irobotPWMLowSideDrivers (const irobotUARTPort_t port, uint8_t pwm0, uint8_t pwm1, uint8_t pwm2) |
| Set the PWM duty cycle of the low-side drivers. | |
| int32_t | irobotSong (const irobotUARTPort_t port, uint8_t songNumber, const irobotSongNote_t *const songNotes, uint8_t nNotes) |
| Define a song. | |
| int32_t | irobotPlaySong (const irobotUARTPort_t port, const uint8_t songNumber) |
| Play a song. | |
| int32_t | irobotStop (const irobotUARTPort_t port) |
| Stops the wheels. | |
Detailed Description
iRobot Create actuator functions.
- Date:
- 2013-10-17 Copyright (C) 2013, Jeff C. Jensen, Edward A. Lee, and Sanjit A. Seshia. This software accompanies An Introductory Lab in Embedded and Cyber-Physical Systems and is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. See http://leeseshia.org/lab.
Definition in file irobotActuator.h.
Function Documentation
| int32_t irobotDigitalOutputs | ( | const irobotUARTPort_t | port, |
| const uint8_t | output | ||
| ) |
Write to the digital output bank of the cargo bay on iRobot.
- Returns:
- error code
- Parameters:
-
[in] port UART port [in] output Pins 0-7
Definition at line 14 of file irobotActuator.cpp.
| int32_t irobotDriveDirect | ( | const irobotUARTPort_t | port, |
| int16_t | leftWheelSpeed, | ||
| int16_t | rightWheelSpeed | ||
| ) |
Directly actuate left and right wheels.
- Returns:
- error code
- Parameters:
-
[in] port UART port [in] leftWheelSpeed Left wheels speed, in mm/s [in] rightWheelSpeed Right wheel speed, in mm/s
Definition at line 26 of file irobotActuator.cpp.
| int32_t irobotDriveDirection | ( | const irobotUARTPort_t | port, |
| int16_t | velocity, | ||
| const irobotDirection_t | direction | ||
| ) |
Drives in a fixed direction.
- Returns:
- error code
- Parameters:
-
[in] port UART port [in] velocity Velocity, in mm/s [in] direction direction
Definition at line 45 of file irobotActuator.cpp.
| int32_t irobotDriveRadius | ( | const irobotUARTPort_t | port, |
| int16_t | velocity, | ||
| int16_t | radius | ||
| ) |
Drive the robot with a fixed linear speed, and turning through a fixed radius.
- Warning:
- Do not call this function for the special cases of driving straight, or clockwise and counter-clockwise turning; this function instructs the robot to drive only nonzero radii.
- Returns:
- error code
- Parameters:
-
[in] port UART port [in] velocity Velocity, in mm/s [in] radius Radius, in mm
Definition at line 63 of file irobotActuator.cpp.
| int32_t irobotLEDs | ( | const irobotUARTPort_t | port, |
| const irobotLED_t | leds, | ||
| const uint8_t | powerColor, | ||
| const uint8_t | powerIntensity | ||
| ) |
Change the state of the iRobot power, play, and advance LEDs.
- Returns:
- error code
- Parameters:
-
[in] port UART port [in] leds LEDs to turn on [in] powerColor Power LED color (G[0] - R[255]) [in] powerIntensity Power LED intensiy (0-255)
Definition at line 89 of file irobotActuator.cpp.
| int32_t irobotPlaySong | ( | const irobotUARTPort_t | port, |
| const uint8_t | songNumber | ||
| ) |
Play a song.
- Returns:
- error code
- Parameters:
-
[in] port UART port [in] songNumber Song number
Definition at line 156 of file irobotActuator.cpp.
| int32_t irobotPWMLowSideDrivers | ( | const irobotUARTPort_t | port, |
| uint8_t | pwm0, | ||
| uint8_t | pwm1, | ||
| uint8_t | pwm2 | ||
| ) |
Set the PWM duty cycle of the low-side drivers.
- Returns:
- error code
- Parameters:
-
[in] port UART port [in] pwm0 PWM for low-side driver 0 (0-128 duty cycle) [in] pwm1 PWM for low-side driver 1 (0-128 duty cycle) [in] pwm2 PWM for low-side driver 2 (0-128 duty cycle)
Definition at line 105 of file irobotActuator.cpp.
| int32_t irobotSong | ( | const irobotUARTPort_t | port, |
| uint8_t | songNumber, | ||
| const irobotSongNote_t *const | songNotes, | ||
| uint8_t | nNotes | ||
| ) |
Define a song.
Each song is alloted 16 notes, but a song can "spill over" into the next if so desired. The maximum number of notes that may be defined is (16 - SongNumber) * 16.
- Returns:
- error code
- Parameters:
-
[in] port UART port [in] songNumber Song number [in] songNotes Song notes [in] nNotes Number of song notes
Definition at line 128 of file irobotActuator.cpp.
| int32_t irobotStop | ( | const irobotUARTPort_t | port ) |
Stops the wheels.
- Returns:
- error code
- Parameters:
-
[in] port UART port
Definition at line 168 of file irobotActuator.cpp.
Generated on Wed Jul 13 2022 12:36:28 by
1.7.2