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. How to Upload Your First Program
  12. 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
  13. The Need for Version Control
  14. Create a Bitbucket Account
  15. First Commit with Bitbucket (25 points)
  16. 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).
  17. Control the Servo Motors

    Movement
  18. 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);
      }
  19. Saving Your First Modification (25 points)
  20. stop() Function
  21. forwardTime() Function
  22. Unequal Motors Tweak
  23. 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).
  24. Improved turn() Function
  25. Improved stop() Function
  26. Challenge: Make the turn() Function use Degrees (25 points)
  27. Movement Challenge (25 points)
  28. 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)
  29. App Inventor
  30. Controller Android App
  31. Programming the Arduino as a Receiver
  32. Renaming the Bluetooth Module
  33. Adding the Bluetooth Module Slide
  34. Pairing with an Android Device and Running Your App
  35. Android Remote Control Challenge
  36. Pairing with a Computer
  37. Controller Processing Program for a Computer
  38. 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)
  39. Adding the Front Sensor
  40. Adding Sensors Slideshow
  41. Adding a Sensors Class
  42. Adding the Left & Right Detectors
    • Logo Mouse Note: The left detector is connected to pin A7. See the Logo Mouse page for more info.
  43. Using Reflected Light
  44. Filtering Out Ambient Light
  45. Smoothing
  46. Obstacle Detection

  47. 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
  48. State Machine
  49. Improved State Machine
  50. avoid() Function
  51. Improved avoid() Function
  52. Turn Random Directions
  53. Turn Random Durations

    Navigating a Labyrinth
  54. 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).
  55. Amplifying the Error
  56. Calibrate targetFront
  57. forwardWhiskers() Function
  58. Sensors Threshold Tweak
  59. Navigating a Known Labyrinth
  60. Navigating an Unknown Labyrinth
  61. Navigating a Known Maze

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

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