Due: Wednesday 2/11/15 at 1:15pm
Submission checklist
Check that the Assignment 3: fetchBot page has
list of required components
setup (diagram, textual description, or Fritzing image)
videos of your project working at various stages
Upload your Arduino sketch (.ino) to moodle
Overview
In this assignment, you will:
create a fetchBot using an Arduino Uno, photoresistors and servo motors
Resources
The followBot from Lab 2 could only travel 1-dimensionally (forward and backward) to follow an object. In this assignment, you'll develop a robot will try to find the brightest spot in the room. With any luck, there will be something exciting at that spot that the bot can fetch for you!
As with your previous assignments, be sure to document your design, process and completed project on a new web page called Assignment 3: fetchBot. Specific requirements are indicated with purple text.
As with all of your robots so far, you should start with your design. You are only allowed to use the following electronics components:
2 x continuous rotation servo motors
3 x photoresistors
3 x 10k ohm resistors
3 x LEDs (pick the same color)
1 x 200 ohm resistor
1 x Arduino Uno
1 x breadboard
jumper wires
Be careful of the proximity of your LEDs to your photoresistors -- they could change the values being sensed!
After you've come up with your design, document it on your Assignment 3: fetchBot web page by:
drawing a diagram
describing in text (e.g., list which connections to make)
With three photoresistors, the logic for your robot is a bit more complicated. You should come up with a plan for:
sensing input
storing the status
actuating the motors
Sensing input will be straightforward, as you will simply read the three photoresistor values. Now, consider how you will store the status and actuate motors.
Light status
How would you generalize your photoBot from Lab 2? Certainly, you'll want to keep the threshold value for when you consider two photoresistor readings to be different. However, with three values, you'll have more situations to deal with than with the original two. For example, you could have:
value 1 "brighter than" value 2 "the same as" value 3
value 2 "brighter than" value 3 "brighter than" value 1
value 2 "the same as" value 1 "brighter than" value 3
and so on...
How many possible situations can there be?
Fill out the moodle "quiz" Assignment 3 - light status with your answer (you will also see the solution upon submission).
Given that there are so many possibilities, think about how you want to use LEDs to indicate status. You probably can't display every possibility, but come up with a plan for what seems reasonable. For example, here is a little of what I did:
if the light being sensed is the same for all 3 photoresistors, all LEDs are off
if the light being sensed is stronger for two (but about the same), those two LEDs are lit
Be sure to describe this on your Assignment 3: fetchBot web page.
Movement
From building the followBot and photoBot, you already have 5 types of movement:
moveForward
moveBackward
rotateLeft
rotateRight
stopMoving
Now define another 4 methods that will probably be useful for your robot:
moveNorthWest should move the robot forward and left diagonally
moveNorthEast should move the robot forward and right diagonally
moveSoutWest should move the robot backward and left diagonally
moveSouthEast should move the robot backward and right diagonally
Putting them together
Come up with a plan to move the robot, based on the status. You should outline this as pseudocode on your Assignment 3: fetchBot web page.
Implement your light status design without the motors. This means you should have a circuit with 3 photoresistors and 3 LEDs. Use the Serial monitor and LEDs to test your code for determining the current light status.
Take a video of your implementation working and put it on your Assignment 3: fetchBot web page.
Implement your new movement functions and test them in isolation by adding to your basicBot code. Your robot should:
move the bot forward, then wait 2 seconds
move the bot backward, then wait 2 seconds
stop the bot, then wait 2 seconds
rotate the bot left, then wait 2 seconds
rotate the bot right, then wait 2 seconds
stop the bot, then wait 2 seconds
move the bot northwest, then wait 2 seconds
rotate the bot southeast, then wait 2 seconds
stop the bot, then wait 2 seconds
move the bot northeast, then wait 2 seconds
rotate the bot southwest, then wait 2 seconds
stop the bot, then wait 2 seconds
Take a video of your implementation working and put it on your Assignment 3: fetchBot web page.
Combine your implementations from Parts 2 and 3 to create your fetchBot. If all goes well, it should be able to find the brightest spot in the room and move to it. In reality, you will probably have challenges getting it to do that due to lighting conditions and photoresistor moodiness. You should at least be able to get it to follow a light that you shine close to it...
Take a video of your implementation working and put it on your Assignment 3: fetchBot web page.
Submit your final Arduino fetchBot sketch (.ino) to the moodle Assignment 3.