From 44d7875f7e783933894ec9332890bff35006bba0 Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Wed, 3 Apr 2024 14:37:26 +0100 Subject: [PATCH] Relocated example and updated readme --- micropython/examples/inventor2040w/README.md | 10 +++++++++- .../examples/inventor2040w/{motors => }/read_speeds.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) rename micropython/examples/inventor2040w/{motors => }/read_speeds.py (98%) diff --git a/micropython/examples/inventor2040w/README.md b/micropython/examples/inventor2040w/README.md index 33fbc9db..7794854e 100644 --- a/micropython/examples/inventor2040w/README.md +++ b/micropython/examples/inventor2040w/README.md @@ -4,6 +4,7 @@ - [Read ADCs](#read-adcs) - [Read GPIOs](#read-gpios) - [Read Encoders](#read-encoders) + - [Read Speeds](#read-speeds) - [LED Rainbow](#led-rainbow) - [Reset Inventor](#reset-inventor) - [Motor Examples](#motor-examples) @@ -22,13 +23,14 @@ - [Velocity Tuning](#velocity-tuning) - [Position on Velocity Tuning](#position-on-velocity-tuning) - [Servo Examples](#servo-examples) - - [Single Servos](#single-servo) + - [Single Servo](#single-servo) - [Multiple Servos](#multiple-servos) - [Simple Easing](#simple-easing) - [Servo Wave](#servo-wave) - [Calibration](#calibration) - [Audio Examples](#audio-examples) - [Tone Song](#tone-song) + - [Motor Song](#motor-song) ## Function Examples @@ -50,6 +52,12 @@ Shows how to initialise and read the 6 GPIO headers of Inventor 2040 W. Demonstrates how to read the angles of Inventor 2040 W's two encoders. +### Read Speeds +[read_speeds.py](read_speeds.py) + +Demonstrates how to read the speeds of Inventor 2040 W's two encoders. + + ### LED Rainbow [led_rainbow.py](led_rainbow.py) diff --git a/micropython/examples/inventor2040w/motors/read_speeds.py b/micropython/examples/inventor2040w/read_speeds.py similarity index 98% rename from micropython/examples/inventor2040w/motors/read_speeds.py rename to micropython/examples/inventor2040w/read_speeds.py index f8e3a245..547652f6 100644 --- a/micropython/examples/inventor2040w/motors/read_speeds.py +++ b/micropython/examples/inventor2040w/read_speeds.py @@ -43,4 +43,4 @@ while not board.switch_pressed(): print(NAMES[i], "=", captures[i].revolutions_per_second, end=", ") print() - time.sleep(SLEEP) \ No newline at end of file + time.sleep(SLEEP)