Answered You can hire a professional tutor to get the answer.

QUESTION

Suppose you are provided with a two-motor circuit that is connected to the Arduino's Digital Pins 5 and 6.

Suppose you are provided with a two-motor circuit that is connected to the Arduino's Digital Pins 5 and 6. The motors are connected to an arm used for inputing number sequences on a rotary numbered dial (similar to a combination lock). When the pin 5 motor receives power, it rotates the arm 2 "numbers" per second up (counterclockwise). When the pin 6 motor receives power, it rotates the arm 2 "numbers" per second down (clockwise). When neither motor is receiving power, or both are, the arm is stationary. Suppose the dial starts at 0 and you have to program the Arduino to enter in the code 18-10-23-8-0. Assuming you need to stop at each number for half a second to "enter" it, and the circuit is already set up and working as described above, write a complete Arduino sketch to input the sequence including setup. You must use at least two custom functions. Show your code.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question