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.
zumo Class Reference
zumo control class More...
#include <zumo.h>
Public Member Functions | |
| zumo () | |
| Create the zumo object connected to the default pins. | |
| zumo (PinName nrst, PinName tx, PinName rx) | |
| Create the zumo object connected to specific pins. | |
| void | reset (void) |
| Force a hardware reset of the 3pi. | |
| void | stop (void) |
| Stop both motors. | |
| float | battery (void) |
| Read the battery voltage on the 3pi. | |
| float | line_position (void) |
| Read the position of the detected line. | |
| void | calibrated_sensors (unsigned short ltab[5]) |
| lecture capteurs calibres | |
| char | speed (short spg, short spd) |
| fonction speed | |
| char | Calibrate_line_sensor_wait () |
| Calibrate the sensors. | |
| void | leds (int val) |
| Write to the 8 LEDs. | |
Detailed Description
zumo control class
Example:
// Drive the zumo forward, turn left, back, turn right, at half speed for half a second #include "mbed.h" #include "zumo.h" zumo pi; int main() { wait(0.5); pi.forward(0.5); wait (0.5); pi.left(0.5); wait (0.5); pi.backward(0.5); wait (0.5); pi.right(0.5); wait (0.5); pi.stop(); }
Definition at line 98 of file zumo.h.
Constructor & Destructor Documentation
| zumo | ( | ) |
| zumo | ( | PinName | nrst, |
| PinName | tx, | ||
| PinName | rx | ||
| ) |
Member Function Documentation
| float battery | ( | void | ) |
| void calibrated_sensors | ( | unsigned short | ltab[5] ) |
| void leds | ( | int | val ) |
| float line_position | ( | void | ) |
| char speed | ( | short | spg, |
| short | spd | ||
| ) |
Generated on Fri Jul 29 2022 16:23:38 by
1.7.2