![]() |
Cubelets API Documentation 2.0
C API
|
Used for both Rotate and Drive Cubelets.
Go to the source code of this file.
Macros | |
| #define | FORWARD 1 |
| #define | BACKWARD 0 |
| #define | set_rotate(x) set_drive(x) |
| #define | set_rotate_direction(x) set_drive_direction(x) |
Functions | |
| void | set_drive (uint8_t bv) |
| Set the speed of a drive (or rotate) block. | |
| void | toggle_directions (void) |
| Switch the direction of a drive Cubelet or rotate Cubelet. | |
| #define FORWARD 1 |
The default direction for Drive Cubelets and Rotate Cubelets.
| #define BACKWARD 0 |
The reverse direction for Drive Cubelets and Rotate Cubelets.
| #define set_rotate | ( | x | ) | set_drive(x) |
Alias for set_drive()
| #define set_rotate_direction | ( | x | ) | set_drive_direction(x) |
Alias for set_drive_direction()
| void set_drive | ( | uint8_t | bv | ) |
Set the speed of a drive or rotate block.
| bv | The value to set the drive to, 0-255. Where 255 is the fastest and 0 is stopped. |
| void toggle_directions | ( | void | ) |
When called, the drive or rotate Cubelet will switch directions.