Answer to Question #98999 in Functional Programming for N/A

Question #98999
Modify the example in Adruino to such that when the motors turn clockwise, the green light blinks, and when the motor turns counter-clockwise, the red light blinks.

Example:

void setup() {

prizm.PrizmBegin(); // Initialize the PRIZM controller
}

void loop() { // repeat in a loop

prizm.setMotorPower(1,25); // spin Motor 1 CW at 25% power
delay(5000); // wait while the motor runs for 5 seconds
prizm.setMotorPower(1,0); // stop motor (coast to stop)
delay(2000); // After stopping, wait here for 2 seconds
prizm.setMotorPower(1,-25); // spin Motor 1 CCW at 25% power
delay(5000); // wait while the motor runs for 5 seconds
prizm.setMotorPower(1,0); // stop motor (coast to stop);
delay(2000); // After stopping, wait here for 2 seconds, then repeat

}
1
Expert's answer
2019-11-21T06:30:23-0500
Dear N/A, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS