Focused on learning Python, using hardware: Adafruit Circuit Playground, Raspberry Pi, Jetson Nano, & other Python-based Microcontrollers & Microprocessors to build Rovers & Robots
Author: Jim Burnham - TopClown@STEAMClown.org. License: Distributed as Open Source.
In this Unit/Module is focused on Robots & Rovers, primarily Rovers, and features using Python, Raspberry Pi or other Python capable devices/platforms. These labs will focus on building the Rover power infrastucture, implementing drive capability with Python, and adding features, sensors, & Autonoumus and telle Operated driving.
A Cap Stone project will be updating a Robot Rover to run with a Raspberry Pi as it's primary controller. The goal is to be able to control the Rover over the Internet with IoT, and eventually run AI training to let the Rover Autonomously navigate
You'll work on developing programs and implementing them using both a browser interface as well as the Raspberry Pi console-based integrated development environment (IDE), and a graphical user interface (GUI) based interfaces. You'll work primarily with Python, but some other languages and interfaces will also be used.
You will also spend some time learning about and gaining experience in the best practices of software development, such as top-down design, object-oriented design, code debug, code validation, corner case testing, and technical/end-user documentation.
I'm a huge supporter of Open Source and Creative Commons resources. This is another way of saying Free, Equitable and Accessible resources... 📽️ 🎧 📰 📖 📝🛠️ 🖼️ - Want to Support Me on this endeavor?
Let's get started... Its going to be a wild, fun, awesome ride...
Web Site: WWW.STEAMCLOWN.ORG | Contact: TopClown@STEAMClown.org | LinkedIn: Jim Burnham | You Tube: jimTheSTEAMClown | TikTok: STEAM Clown
Consider Supporting my Open Source STEAM Curriculum Development -- Check Out My How To Help Page - Patreon, PayPal, Venmo, My Amazon Wishlist
Primer: "Aaron, I can imagine no way in which this thing could be considered anywhere remotely close to safe. All I know is I spent six hours in there and I'm still alive... You still want to do it?"
As with any activity, please make sure you are using appropriate safety equipment. If you are coding, writing, reading, or working a lab, make sure you stand up and stretch every hour or so, Please consider any safety issues connecting to a Raspberry Pi, Arduino, computers and other electronic equipment.
8.n.n.n - Robots & Rovers - Driving A Motor - 📰 Slide Presentation
8.n.n.n - Robots & Rovers - Driving A Motor - 📖 Lesson Tutorial
8.n.n.n - Robots & Rovers - Driving A Motor - 📰 Slide Presentation
8.n.n.n - Robots & Rovers - Driving A Motor - 📖 Lesson Tutorial
When a connector is keyed, it has:
A notch, tab, ridge, or missing pin
A matching shape on the mating connector
👉 These features prevent incorrect orientation.
So instead of being able to plug it in:
upside down ❌
backwards ❌
shifted over ❌
…it will only fit:
the one correct way ✅
Think of it like a house key:
A key only fits one lock orientation
You can’t insert it upside down or backwards (or it won’t turn)
A keyed connector works the same way mechanically.
One side is square, one is rounded
Prevents reversing polarity
Small plastic latch + slot
Only mates one way
A missing pin + blocked hole acts as the key
The shape itself is the key (especially older USB-A)
In your case:
1 = L–
2 = L+
3 = R–
4 = R+
If the connector were not keyed, someone could:
Flip it → left/right swapped ❌
Reverse it → polarity reversed ❌
Offset it → total chaos ❌
👉 Result:
Motors spin wrong direction
Robot drives backward or spins
Possible electrical stress on drivers
🔁 Reversed polarity (L+ ↔ L–)
🔄 Swapped channels (Left ↔ Right)
⚡ Misalignment (wrong pins connected)
8.n.n.n - Robots & Rovers - Driving A Motor - 📰 Slide Presentation
8.n.n.n - Robots & Rovers - Driving A Motor - NeoPixels - 📖 Lesson Tutorial
You defined:
Pin 1 = L–
Pin 2 = L+
Pin 3 = R–
Pin 4 = R+
Encodes function, not color.
Use the output terminals (NOT the IN pins):
Pin 2 (L+) → OUT1
Pin 1 (L–) → OUT2
Pin 4 (R+) → OUT3
Pin 3 (R–) → OUT4
The inputs control polarity of the outputs.
IN1 IN2 OUT1 OUT2 Motor
1 0 + – Forward ✅
0 1 – + Reverse
0 0 0 0 Coast
1 1 0 0 Brake
👉 Because:
OUT1 → L+ (Pin 2)
OUT2 → L– (Pin 1)
So:
IN1 = HIGH, IN2 = LOW → Left motor forward
IN3 IN4 OUT3 OUT4 Motor
1 0 + – Forward ✅
0 1 – + Reverse
0 0 0 0 Coast
1 1 0 0 Brake
👉 Because:
OUT3 → R+ (Pin 4)
OUT4 → R– (Pin 3)
So:
IN3 = HIGH, IN4 = LOW → Right motor forward
Connector: L298N:
Wire/Pin 1 = L– = Wire/Pin 1 → OUT2 : Forward Controlled with IN1 = 1, IN2 = 0, IN3 = 1, IN4 = 0
Wire/Pin 2 = L+ = Wire/Pin 2 → OUT1
Wire/Pin 3 = R– = Wire/Pin 3 → OUT4
Wire/Pin 4 = R+ = Wire/Pin 4 → OUT3
Forward:
IN1 = 1, IN2 = 0
IN3 = 1, IN4 = 0
No dependence on motor wire color
No ambiguity about CW/CCW
Every rover behaves identically
You can debug with simple voltage logic:
8.n.n.n - Robots & Rovers - Driving A Motor - 📰 Slide Presentation
8.n.n.n - Robots & Rovers - Driving A Motor - NeoPixels - 📖 Lesson Tutorial
Driving?
If you are a teacher and want to connect and teach this Lesson or Module, discuss how I teach it, give me feedback, please contact me at TopClown@STEAMClown.org
To access this Lesson Plan and the Teacher collaboration area, you will have needed to connect with me so I can Share the content with you. Please go to the Teachers & Partner Page, check out my Licensing and fill out my Collaboration and Curriculum Request Form. I'll review and then grant you access to the requested areas and lesson plans if they exist.
If you have questions or feedback on how I can make a presentation, lesson, lab better please give use my Feedback Form.
I’ll work on getting these in, but it’s the last thing I want to work on :-) When I have them updated, I’ll move to the top of the Lesson Plan.
NGSS: <list standard numbers>
California CTE Standards: <list standard numbers>
Related Instructional Objectives (SWBAT): <list standard numbers>
CCSS: nnn, RSIT: nnn, RLST: nnn, WS: nnn, WHSST: nnn, A-CED: nnn, ETS: nnn <list standard numbers>
Main Standard:
Priority standards:
National Standards:
Reference Text Book - Links
Reference Sites -