#include <Servo.h>
Servo servouno;
int posicion_servouno;
int posicio_servodos;
void setup() {
// put your setup code here, to run once:
servouno.attach(9);
pinMode(10, INPUT);
}
void loop() {
int statinicial = 0;
statinicial = digitalRead(10);
if (statinicial == LOW);
posicion_servouno = 120;
servouno.write(posicion_servouno);
}
else {
posicion_servodos =30;
servouno.write(posicion_servodos);
}
system
December 21, 2017, 12:57pm
2
You're missing a final }
And a set of these [code][/code]
system
December 21, 2017, 12:59pm
3
if (statinicial == LOW);
Oops
MorganS
December 21, 2017, 1:45pm
4
Doesn't it have a compile error on the "else without if"?
wvmarle
December 21, 2017, 3:54pm
5
OP forgot something even more important than code tags and making sure the code even compiles before posting it here: a description of the actual problem they need help with.