Question: write a Arduino code that would work for this lab Requirements and Procedure: Use your hands and a screwdriver to put together the mini 2

write a Arduino code that would work for this lab
Requirements and Procedure:
Use your hands and a screwdriver to put together the mini 2-layer rover platform. There
are two DC motors that you will need to attach securely to the red aluminum chassis.
Think about the cables coming from the motors and where you may want them to go /
not go. Please consult the pictures below at the bottom of Part 1 for a better
understanding of what the end result may look like.
Pickup an Adafruit or Arduino Motor Shield from Lab 4 material location in B&H 095.
Connect your Shield to your Uno.
Connect your DC motors to the motor 1 and 2+//- pins.
You are now ready to code away! If you are using the Adafruit Shield, Load the Adafruit
Motor Shield and Adafruit Motor Shield V2 library, which will also load some examples
(from the examples menu). Spend time looking at the DC Motor control example - this
will be most helpful.
Develop code to make Rover do a dance - at least 6 different steps (e.g. turn right, move
forward, turn left, move backward, etc.)- on command. Define your state machine in
Arduino code. You might think about a push button. At the end of the dance, Rover
must wait until the next command. Hint: Think about how you could represent "waiting
for a command" in code, and how this relates to your state machine diagram.
Finally, disconnect the umbilical (USB). The 9 V battery you were using to power the
motors can also be used to power the Arduino. Note the jumper that came with your
Shield - there is a spot on the Motor Shield that will accept the jumper and will connect
9 V power to the Vin on the Arduino. You will then have Rover doing a dance, alone, on
command of a button press.
write a Arduino code that would work for this lab

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!