Skip to content

Instantly share code, notes, and snippets.

@minhviet0308
Last active October 4, 2023 17:38
Steering test
#include <Servo.h>
Servo head;
Servo cat;
#define SERVO_PIN 9
#define SERVO_CAT 10
#define FRONT 90
int RIGHT=FRONT+FRONT;
int LEFT=0;
void setup() {
// put your setup code here, to run once:
head.attach(SERVO_PIN);
// cat.attach(SERVO_CAT);
// cat.write(LEFT);
head.write(LEFT);
delay(1000);
head.write(RIGHT);
// cat.write(RIGHT);
delay(1000);
head.write(FRONT);
// cat.write(FRONT);
}
void loop() {
// put your main code here, to run repeatedly:
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment