A convenience class for accessing Roomba's sensors.
More...
|
class | Bump |
| The state of the bump sensors: false = no bump, true = bump. More...
|
|
class | Button |
| The state of the four Roomba buttons: false = button not pressed, true = button pressed. More...
|
|
class | Cliff |
| The state of the cliff sensors: false = no cliff, true = cliff. More...
|
|
class | DirtDetector |
| The current dirt detection level (0-255) of the dirt detector. Higher values indicate higher levels of dirt detected. More...
|
|
class | MotorOvercurrent |
| The state of the five motors’ overcurrent sensors: false = no overcurrent, true = overcurrent. More...
|
|
class | Wheeldrop |
| The state of the Wheeldrop sensors: false = wheel up, true = wheel dropped. More...
|
|
|
bool | Wall [get] |
| The state of the wall sensor: false = no wall, true = wall.
|
|
bool | VirtualWall [get] |
| The state of the virtual wall sensor: false = no wall, true = wall.
|
|
int | RemoteControlCommand [get] |
| The command number of the remote control command currently being received by Roomba. A value of 255 indicates that no remote control command is being received.
|
|
int | Distance [get] |
| The distance that Roomba has traveled in millimeters since the distance it was last requested. This is the same as the sum of the distance traveled by both wheels divided by two. Positive values indicate travel in the forward direction; negative in the reverse direction. If the value is not polled frequently enough, it will be capped at its minimum or maximum. (16 bit signed integer)
|
|
int | Angle [get] |
| The angle that Roomba has turned through since the angle was last requested. The angle is expressed as the difference in the distance traveled by Roomba’s two wheels in millimeters, specifically the right wheel distance minus the left wheel distance, divided by two. This makes counter-clockwise angles positive and clockwise angles negative. This can be used to directly calculate the angle that Roomba has turned through since the last request. Since the distance between Roomba’s wheels is 258mm, the equations for calculating the angles in familiar units are: Angle in radians = (2 * difference) / 258 Angle in degrees = (360 * difference) / (258 * Pi). If the value is not polled frequently enough, it will be capped at its minimum or maximum. (16 bit signed integer)
|
|
ChargingState | ChargingState [get] |
| Get charging state of the robot.
|
|
int | Voltage [get] |
| The voltage of Roomba’s battery in millivolts (mV).
|
|
int | Current [get] |
| The current in milliamps (mA) flowing into or out of Roomba’s battery. Negative currents indicate current is flowing out of the battery, as during normal running. Positive currents indicate current is flowing into the battery, as during charging.
|
|
int | Temperature [get] |
| The temperature of Roomba’s battery in degrees Celsius.
|
|
int | Charge [get] |
| The current charge of Roomba’s battery in milliamp-hours (mAh). The charge value decreases as the battery is depleted during running and increases when the battery is charged.
|
|
int | Capacity [get] |
| The estimated charge capacity of Roomba’s battery. When the Charge value reaches the Capacity value, the battery is fully charged.
|
|
|
Robot | robot |
| The robot class, accessible by all dervied classes.
|
|
A convenience class for accessing Roomba's sensors.
Roomba.Sensors.Sensors |
( |
Robot |
_robot | ) |
|
Update the sensor state.
- Parameters
-
Bump Roomba.Sensors.Bumps |
Cliff Roomba.Sensors.Cliffs |
Motor Overcurrent sensors.
The angle that Roomba has turned through since the angle was last requested. The angle is expressed as the difference in the distance traveled by Roomba’s two wheels in millimeters, specifically the right wheel distance minus the left wheel distance, divided by two. This makes counter-clockwise angles positive and clockwise angles negative. This can be used to directly calculate the angle that Roomba has turned through since the last request. Since the distance between Roomba’s wheels is 258mm, the equations for calculating the angles in familiar units are: Angle in radians = (2 * difference) / 258 Angle in degrees = (360 * difference) / (258 * Pi). If the value is not polled frequently enough, it will be capped at its minimum or maximum. (16 bit signed integer)
int Roomba.Sensors.Capacity |
|
get |
The estimated charge capacity of Roomba’s battery. When the Charge value reaches the Capacity value, the battery is fully charged.
int Roomba.Sensors.Charge |
|
get |
The current charge of Roomba’s battery in milliamp-hours (mAh). The charge value decreases as the battery is depleted during running and increases when the battery is charged.
Get charging state of the robot.
int Roomba.Sensors.Current |
|
get |
The current in milliamps (mA) flowing into or out of Roomba’s battery. Negative currents indicate current is flowing out of the battery, as during normal running. Positive currents indicate current is flowing into the battery, as during charging.
int Roomba.Sensors.Distance |
|
get |
The distance that Roomba has traveled in millimeters since the distance it was last requested. This is the same as the sum of the distance traveled by both wheels divided by two. Positive values indicate travel in the forward direction; negative in the reverse direction. If the value is not polled frequently enough, it will be capped at its minimum or maximum. (16 bit signed integer)
int Roomba.Sensors.RemoteControlCommand |
|
get |
The command number of the remote control command currently being received by Roomba. A value of 255 indicates that no remote control command is being received.
int Roomba.Sensors.Temperature |
|
get |
The temperature of Roomba’s battery in degrees Celsius.
bool Roomba.Sensors.VirtualWall |
|
get |
The state of the virtual wall sensor: false = no wall, true = wall.
int Roomba.Sensors.Voltage |
|
get |
The voltage of Roomba’s battery in millivolts (mV).
The state of the wall sensor: false = no wall, true = wall.
The documentation for this class was generated from the following file:
- C:/Users/Greg/Documents/GitHub/RoboLib/src/Roomba.cs