1
0
mirror of https://github.com/2martens/uni.git synced 2026-05-06 11:26:25 +02:00

[ES] Fixed wrong boundaries

Signed-óff-by: Jim Martens <github@2martens.de>
This commit is contained in:
2015-05-05 17:36:50 +02:00
parent f4dac3083d
commit 1224e51a80

View File

@ -1,4 +1,4 @@
#include <Servo.h>
#include <Servo>
// these variables describe the used hardware pins
// adjust them when you use other pins
@ -10,7 +10,7 @@ Servo ourServo;
// used to achieve a 10 Hz frequency
// don't touch them
int rc = 1049999;
long rc = 1049999;
/**
* Setup function for initial setup code
@ -20,8 +20,6 @@ void setup() {
ourServo.attach(servoPin);
ourServo.write(90);
pinMode(servoPin, OUTPUT);
// initialize serial port
Serial.begin(9600);
}
@ -35,12 +33,12 @@ void loop() {
delay(10);
}
delay(1000);
for (int i = 180; i >= -180; --i) {
for (int i = 180; i >= 0; --i) {
ourServo.write(i);
delay(10);
}
delay(1000);
for (int i = -180; i <= 90; ++i) {
for (int i = 0; i <= 90; ++i) {
ourServo.write(i);
delay(10);
}