pimoroni-pico/micropython/examples/motor2040
ZodiusInfuser ae191697f2 Added a motor profiler example and finished constructor args 2022-04-20 14:26:32 +01:00
..
README.md More mp binding and example work 2022-04-07 17:57:38 +01:00
current_meter.py More mp binding and example work 2022-04-07 17:57:38 +01:00
led_rainbow.py More mp binding and example work 2022-04-07 17:57:38 +01:00
motor_cluster.py More mp binding and example work 2022-04-07 17:57:38 +01:00
motor_encoders.py More encoder MP work 2022-04-19 20:22:35 +01:00
motor_encoders_capture.py More encoder MP work 2022-04-19 20:22:35 +01:00
motor_profiler.py Added a motor profiler example and finished constructor args 2022-04-20 14:26:32 +01:00
motor_wave.py More mp binding and example work 2022-04-07 17:57:38 +01:00
multiple_motors.py More mp binding and example work 2022-04-07 17:57:38 +01:00
read_sensors.py More mp binding and example work 2022-04-07 17:57:38 +01:00
sensor_feedback.py More mp binding and example work 2022-04-07 17:57:38 +01:00
simple_easing.py More mp binding and example work 2022-04-07 17:57:38 +01:00
single_motor.py More mp binding and example work 2022-04-07 17:57:38 +01:00
turn_off_led.py More mp binding and example work 2022-04-07 17:57:38 +01:00
turn_off_motors.py More mp binding and example work 2022-04-07 17:57:38 +01:00

README.md

Motor 2040 Micropython Examples

Motor Examples

Single Motor

single_motor.py

Demonstrates how to create a Motor object and control it.

Multiple Motors

multiple_motors.py

Demonstrates how to create multiple Motor objects and control them together.

Motor Cluster

motor_cluster.py

Demonstrates how to create a MotorCluster object to control multiple motors at once.

Simple Easing

simple_easing.py

An example of how to move a motor smoothly between random positions.

Motor Wave

motor_wave.py

An example of applying a wave pattern to a group of motors and the LEDs.

Calibration

calibration.py

Shows how to create motors with different common calibrations, modify a motor's existing calibration, and create a motor with a custom calibration.

Function Examples

Read Sensors

read_sensors.py

Shows how to initialise and read the 6 external and 2 internal sensors of Motor 2040.

Sensor Feedback

sensor_feedback.py

Show how to read the 6 external sensors and display their values on the neighbouring LEDs.

Current Meter

current_meter.py

An example of how to use Motor 2040's current measuring ability and display the value on the onboard LED bar.

LED Rainbow

led_rainbow.py

Displays a rotating rainbow pattern on the Motor 2040's onboard LED.

Turn Off LED

turn_off_led.py

A simple program that turns off the onboard LED.