- Nano Mouse
- What is an Arduino
- Modular Maze Tables (instructions to build a maze table)
- 3D Printing the Frame
- Painting a PLA Frame
How to Make a Nano Mouse 3.0 Video
Work through the appropriate slideshow
Installing the Arduino IDE & Drivers
- Since making this video I have found that you can print a frame using either PLA or ABS in any color and get good readings from your sensors so long as you paint the sensor slots with black acrylic paint.
Installing the Arduino IDE & Drivers on OS X 10.9 & Below
Example Sketches, Comments, and Reference
LEDs & Buttons
- espMouse Note: Refer to the espMouse page for instructions specific to the NodeMCU.
Saving with Git & Bitbucket (25 points)
Test and Calibrate Your Servo Motors
- espMouse Note #1: The onboard LED for the NodeMCU 1.0 is attached to pin 16 and is turned on when the pin is set LOW (counterintuitive and annoying). For this reason, you will need to add a line of code prior to the while loop that sets the pin HIGH to turn it off and change the line of code that comes after the while loop so that it sets pin 16 LOW (to turn it on after the button is pressed).
- espMouse Note #2: The How to Make an espMouse slideshow directs you to connect the button to pin D6, so change your code from
const byte buttonPin = 9; to
const byte buttonPin = D6;
- espMouse Note #3: You will need to add yield(); inside the while loop that is used to listen for the button press. For information on why, refer to: https://github.com/esp8266/Arduino/blob/master/doc/reference.md#timing-and-delays
Control the Servo Motors
- espMouse Note: The How to Make an espMouse slideshow directs you to connect your Servos to pins SD3 and D4. To attach servo motors to these pins, refer to them as 10 and D4 respectively (see the NodeMCU 1.0's pin map to understand why). If you have a NodeMCU from SeeedStudio, you can connect your servos to pins SD3 and SD2 (and refer to them as 10 and 9 in your code).
Saving Your First Modification (25 points)
Unequal Motors Tweak
Improved turn() Function
Improved stop() Function
Challenge: Make the turn() Function use Degrees (25 points)
Organizing Your Code
- SM-S4303R Servo Note: Remember, these servos turn in the opposite direction compared to the Parallax servos. As a consequence, you must reverse the manner in which power is added to and subtracted from the stop signal (see the note from the forward() Function lecture).
- At this point I highly suggest you break down and start learning to use Git. Both codecademy and Udacity offer free courses that explain how to use this tool.
Improved State Machine
Improved avoid() Function
Turn Random Directions
Turn Random Durations
Navigating a Labyrinth
Amplifying the Error
Sensors Threshold Tweak
Navigating a Known Labyrinth
Navigating an Unknown Labyrinth
Navigating a Known Maze
- SM-S4303R Servo Note: Remember, these servos turn in the opposite direction compared to the Parallax servos. As a consequence, you must reverse the manner in which power and the error term is added to and subtracted from the stop signal (see the note from the forward() Function lecture).
Solving a Maze
Dynamic Programming / Flood Fill Algorithm
Changing the Mouse's Initial Position and Heading
Initializing the Values Array
Setting the Target Cell
solve() for the North Neighbor
Solve() for All Neighboring Cells
Adding Virtual Walls
solve() Given North Wall
solve() Given Neighboring Walls
solve() for All Cells
Navigating a Maze
Wirelessly Debugging a Nano MouseWirelessly Debugging an espMouse
Stepping Through the Maze
Speed Run Tips