The code shown in the image below was taken from the Basic Timed Motion Code in
ID: 3673012 • Letter: T
Question
The code shown in the image below was taken from the Basic Timed Motion Code in the Practice Problems Folder; however this code does not compile. Click on the error within the code shown below.
#include // Include servo library//Note, these variables must be globe //multiple servo attachments causes undefined behavior Servo servoLeft; // Declare left servo Servo 3ervoRight; // Declare Right servo void setup() // Built in initialization block servoRight.attach (30) // Attach right signal to pin 30 servoLeft.attach (31) // Attach right signal to pin 31 //set both servos to go forward at 100% speed rightForward 100); leftForwardf 100 ); //Wait for 1 second (The delay function uses milliseconds as input) delay (1000) void loop ) //Do nothing in this loop User-Defined Functions void leftForwardi int powerLevel ) //Limit numbers to machine constraints if( 100Explanation / Answer
define function void loop method()
void loop()
{delay();
rightForward();
leftForward();
}