File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed
micropython/examples/inventor Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 3131- [ Audio Examples] ( #audio-examples )
3232 - [ Tone Song] ( #tone-song )
3333 - [ Motor Song] ( #motor-song )
34+ - [ Showcase Examples] ( #showcase-examples )
35+ - [ Inventor Bot] ( #inventor-bot )
3436
3537## Function Examples
3638
@@ -194,4 +196,12 @@ This example shows you how you can use Inventor 2040/2350 W's audio output with
194196### Motor Song
195197[ audio/motor_song.py] ( audio/motor_song.py )
196198
197- A fun example of how to change a motor's frequency to have it play a song.
199+ A fun example of how to change a motor's frequency to have it play a song.
200+
201+
202+ ## Showcase Examples
203+
204+ ### Inventor Bot
205+ [ showcase/inventor_bot.py] ( [showcase/inventor_bot.py )
206+
207+ A 2-wheeled remote-controlled robot with gripper, powered by Inventor 2040/2350 W.
Original file line number Diff line number Diff line change 66
77
88"""
9- A demonstration of driving both of Inventor 2040 W's motor outputs through a
10- sequence of velocities, with the help of their attached encoders and PID control.
9+ A 2-wheeled remote-controlled robot with gripper, powered by Inventor 2040/2350 W.
10+
11+ Remote control is achieved by an IR receiver is connected to GPIO0.
12+ Signals detected by the receiver are processed by the AyeArr library
13+ and passed to callback functions for various robot actions. These are
14+ * Drive forward / backward
15+ * Turn left / right
16+ * Gripper open / close
17+ * Set onboard LED colours
18+
19+ The gripper is driven by a servo connected to the SERVO_1 header.
1120
1221Press "User" to exit the program.
1322"""
1423
1524# Wheel friendly names
1625LEFT = MOTOR_A
1726RIGHT = MOTOR_B
18- NAMES = ["LEFT" , "RIGHT" ]
1927
2028# Constants
2129UPDATES = 100 # How many times to update the motor per second
2230UPDATE_RATE = 1 / UPDATES
23- PRINT_DIVIDER = 4 # How many of the updates should be printed (i.e. 2 would be every other update)
2431
2532# Motor Constnats
2633GEAR_RATIO = 50 # The gear ratio of the motors
You can’t perform that action at this time.
0 commit comments