Dirk De Wit and I partnered up to create this crawler.
We have combined our servo motors to work together. The sequence goes like this:
1. First motor drives wheels forward
2. Second motor deploys claw (works best on carpet)
3. First motor returns wheels to initial position
4. Second motor retracts claw (with an added benefit of pulling the contraption forward)
https://www.sparkcamera.com/v/YXi9eORZzj
#include <Servo.h>
Servo servoWheel;
Servo servoLeg;
int moveDelay = 1000;
void setup() {
Serial.begin(9600);
servoWheel.attach(7);
servoLeg.attach(2);
breakIn();
backward();
}
void loop() {
delay(moveDelay);
forward();
Serial.println("Move forwards");
delay(moveDelay);
breakOut();
Serial.println("Break out");
delay(moveDelay);
backward();
Serial.println("Move backwards");
delay(moveDelay);https://ssl.gstatic.com/ui/v1/icons/mail/ellipsis.png); height: 8px; opacity: 0.3; width: 20px; background-repeat: no-repeat no-repeat;" />
breakIn();
Serial.println("Break In");
}
void forward() {
servoWheel.write(180);
}
void backward() {
servoWheel.write(0);
}
void breakOut() {
servoLeg.write(70);
}
void breakIn() {
servoLeg.write(175);
}
- Login to post comments