Video Tutorials

    Getting Started
  1. Nano Mouse
  2. What is an Arduino
  3. Modular Maze Tables (instructions to build a maze table)
  4. 3D Printing the Frame
  5. Painting a PLA Frame
    • 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.
  6. How to Make a Nano Mouse 3.0 Video
  7. Work through the appropriate slideshow
  8. Installing the Arduino IDE & Drivers
    • espMouse Note: Refer to the espMouse page for instructions specific to the NodeMCU.
  9. Installing the Arduino IDE & Drivers on OS X 10.9 & Below
  10. Example Sketches, Comments, and Reference
  11. LEDs & Buttons
    • 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
  12. Saving with Git & Bitbucket (25 points)
  13. Test and Calibrate Your 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).
  14. Control the Servo Motors

    Movement
  15. forward() Function
    • SM-S4303R Servo Note: Originally I made these videos with Parallax motors which have a range of 1500±200, and for reasons that will become clear later in the course I instruct you to power your mouse at half speed (100). I have since switched to using the SM-S4303R servos which have a range of 1500±500. If you are using these motors, you should set the power level for your mouse at 250 (half power).
    • SM-S4303R Servo Note: These servos turn in the opposite direction compared to the Parallax motors used in this video. As a consequence, you will need to reverse the maner in which power is added to and subtracted from the stop signal as follows:
      void forward()
      {
          leftServo.writeMicroseconds(1500-power);
          rightServo.writeMicroseconds(1500+power);
      }
  16. Saving Your First Modification (25 points)
  17. stop() Function
  18. forwardTime() Function
  19. Unequal Motors Tweak
  20. turn() Function
    • 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).
  21. Improved turn() Function
  22. Improved stop() Function
  23. Challenge: Make the turn() Function use Degrees (25 points)
  24. Movement Challenge (25 points)
  25. Organizing Your Code
    • 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.

    Remote Control
    Remote Control a Nano Mouse via Bluetooth
    (Android only)
  26. App Inventor
  27. Controller Android App
  28. Programming the Arduino as a Receiver
  29. Renaming the Bluetooth Module
  30. Adding the Bluetooth Module Slide
  31. Pairing with an Android Device and Running Your App
  32. Android Remote Control Challenge
  33. Pairing with a Computer
  34. Controller Processing Program for a Computer
  35. Remote Control an espMouse via WiFi
    (Android, iOS, Blackberry, Windows...)
    Create Web App with Cloud9
    Host from NodeMCU
    • After making this video, I discovered I got better results if I put the line that creates the access point towards the top of the setup (directly below the 1000 millisecond delay), and the code that creates the servo objects and sets them to stop towards the bottom of the setup.

    Sensors
    Nano Mouse (Using Arduino Nano)
  36. Adding the Front Sensor
  37. Adding Sensors Slideshow
  38. Adding a Sensors Class
  39. Adding the Left & Right Detectors
    • Logo Mouse Note: The left detector is connected to pin A7. See the Logo Mouse page for more info.
  40. Using Reflected Light
  41. Filtering Out Ambient Light
  42. Smoothing
  43. Obstacle Detection

  44. espMouse (Using NodeMCU)
    Adding Sensors Slideshow
    Adding a Sensors Class
    Adding the Left & Right Detectors
    Using Reflected Light
    Filtering Out Ambient Light
    • This video only covers how to write the code. To understand the theory behind and the benefits of filtering out ambient light, watch the original Nano Mouse version of this lecture (just don't follow along the coding portion). 
    You can now return to following the original Nano Mouse video tutorials, starting with Smoothing.

    Obstacle Avoidance
  45. State Machine
  46. Improved State Machine
  47. avoid() Function
  48. Improved avoid() Function
  49. Turn Random Directions
  50. Turn Random Durations

    Navigating a Labyrinth
  51. Proportional Control
    • 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).
  52. Amplifying the Error
  53. Calibrate targetFront
  54. forwardWhiskers() Function
  55. Sensors Threshold Tweak
  56. Navigating a Known Labyrinth
  57. Navigating an Unknown Labyrinth
  58. Navigating a Known Maze

    Solving a Maze
  59. Dynamic Programming / Flood Fill Algorithm
  60. Maze Class
  61. Changing the Mouse's Initial Position and Heading
  62. Initializing the Values Array
  63. Setting the Target Cell
  64. solve() for the North Neighbor
  65. Solve() for All Neighboring Cells
  66. Adding Virtual Walls
  67. solve() Given North Wall
  68. solve() Given Neighboring Walls
  69. solve() for All Cells

    Navigating a Maze
  70. findBestNeighbor()
  71. findBestNeighbor() Challenge
  72. addWalls()
  73. Wirelessly Debugging a Nano Mouse
  74. Wirelessly Debugging an espMouse
  75. forwardWhiskers() Modified
  76. scanWalls()
  77. turnTowardBestNeighbor()
  78. Stepping Through the Maze
  79. #ifdef DEBUG
  80. Congratulations
  81. Speed Run Tips
Comments