Could you help me to solve this questions
* Your name _______________
* Please save your program as YourFirstNameLastName_mid2016.
*/
#include <Servo.h> // Include servo library
void forward(unsigned int time); //full speed forward for a duration of time (ms)
Servo servoLeft; // Declare left and right servos
servo servoRight;
void setup() {
servoLeft.attach(11); // Attach left servo to pin 11
servoRight.attach(12) // Attach right servo to pin 12
DDRB |=OxO2; //set pin direction properly
}
void loop() {
char currentStatus;
currentStat = (PinB && 0x1); //check the status of pin 13
if (currentStatus =1)
{
//display message
//turn on LED connected to pin 8
//robot move forward for half second
//turn off LED connected to pin 8
//robot move forward for half seond
}
else //complete more code
}
}
void Forward(unsigned int time) // Full-speed Forward function
{
servoLeft.writeMicroseconds(1700); // Left wheel counerclockwise
servoRight.writeMicroseconds(1300); // Right wheel clockwise
delay(time); // Maneuver for time ms
}
void backward(unsigned int time); // Full-speed Backward function
{
servoLeft.writeMicroseconds(1300); // Left wheel clockwise
servoRight.writeMicroseconds(1700); // Right wheel counterclockwise
delay(time); // Maneuver for time ms
}
10 years ago
15
- psychology discussion
- Special needs students assignment
- name and describe the 3 main shapes of bactirea
- Finance and Budgeting for the Public Sector - Apple Inc.
- PSYCH 600 Week 5 Individual Assignment Interview a Senior Citizen
- 1. A clinical trial is planned to compare an experimental medication designed to lower blood pressure to a
- unit 4 assignments
- Only original and professional work required
- Assignment 2: Database Systems Microsoft sql Server 2012
- Hurricanes