MicroServoMouse
This commit is contained in:
parent
7a8c6154a9
commit
bf17e4b02e
1 changed files with 23 additions and 0 deletions
23
arduino/MicroServoMouse/MicroServoMouse.ino
Normal file
23
arduino/MicroServoMouse/MicroServoMouse.ino
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#include <Servo.h>
|
||||||
|
|
||||||
|
Servo fore;x
|
||||||
|
Servo hind;
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
fore.attach(9, 1460-928, 1460+928);
|
||||||
|
hind.attach(10, 1440-928, 1440+928);
|
||||||
|
fore.write(90);
|
||||||
|
hind.write(90);
|
||||||
|
delay(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
fore.write(115);
|
||||||
|
delay(250);
|
||||||
|
hind.write(75);
|
||||||
|
delay(250);
|
||||||
|
fore.write(65);
|
||||||
|
delay(250);
|
||||||
|
hind.write(105);
|
||||||
|
delay(250);
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue