3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

The Arduino Mothbot

Step 8The Final Code

The Final Code
«
  • IMG_2685.JPG
  • IMG_2686.JPG
Here is the final code used to run the Arduino Mothbot. In the code I've included print statements to the Arduino serial port. If you have the Arduino connected through the USB port of your computer you should be able to see the print statements that tell you which way the robot is planning to go. You may want to adjust the light sensor threshold value to fine tune the behavior of the robot. The threshold depends mainly on your sensors and the ambient light of the location you are in.
https://github.com/chrisgilmerproj/Mothbot/blob/master/mothbot.pde

« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
51
Followers
7
Author:natantus(Chris Gilmer Project)
I'm a software and aerospace engineer. When I've got free time I like to work on robot projects and love to play with my Makerbot Cupcake and Eggbot. I would love to be involved in DIY prosthetics a...
more »