Skip to content

Instantly share code, notes, and snippets.

@hrysd
Created July 6, 2016 11:45
Show Gist options
  • Save hrysd/a5d012ce7f2cbf6646c5a201f1653ecf to your computer and use it in GitHub Desktop.
Save hrysd/a5d012ce7f2cbf6646c5a201f1653ecf to your computer and use it in GitHub Desktop.
#include <Servo.h>
Servo hoge;
int val; // サーボモーターの角度
void setup() {
hoge.attach(9);
}
void loop() {
val = 0;
hoge.write(val);
delay(1500);
val = 90;
hoge.write(val);
delay(1500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment