2022-05-12 12:20:52 +00:00
|
|
|
# Pico Motor Shim C++ Examples <!-- omit in toc -->
|
|
|
|
|
|
|
|
- [Examples](#examples)
|
|
|
|
- [Single Motor](#single-motor)
|
|
|
|
- [Dual Motors](#dual-motors)
|
|
|
|
- [Movements](#movements)
|
|
|
|
- [Motor Song](#motor-song)
|
|
|
|
|
|
|
|
|
2022-05-12 13:45:20 +00:00
|
|
|
## Examples
|
2022-05-12 12:20:52 +00:00
|
|
|
|
|
|
|
### Single Motor
|
|
|
|
[motorshim_single_motor.cpp](motorshim_single_motor.cpp)
|
|
|
|
|
|
|
|
Demonstrates how to create a Motor object and control it.
|
|
|
|
|
|
|
|
|
|
|
|
### Dual Motors
|
|
|
|
[motorshim_dual_motors.cpp](motorshim_dual_motors.cpp)
|
|
|
|
|
|
|
|
Demonstrates how to create two Motor objects and control them together.
|
|
|
|
|
|
|
|
|
|
|
|
### Movements
|
|
|
|
[motorshim_movements.cpp](motorshim_movements.cpp)
|
|
|
|
|
|
|
|
An example of how to perform simple movements of a 2-wheeled driving robot.
|
|
|
|
|
|
|
|
|
|
|
|
### Motor Song
|
|
|
|
[motorshim_motor_song.cpp](motorshim_motor_song.cpp)
|
|
|
|
|
|
|
|
A fun example of how to change a motor's frequency to have it play a song.
|