C:\Users\user\AppData\Local\Temp\ccX2z2fF.ltrans0.ltrans.o: In function `main':
ccX2z2fF.ltrans0.o:(.text.startup+0x218): undefined reference to `loop'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compilación en tarjeta Arduino/Genuino Uno.
Alguien sabria que es lo que puede ser??, la programacion es esta:
Código
int vuelta=11; int j; #include <Servo.h> Servo myservodir; Servo myservopuerta; int s0=3, s1=4, s2=5, s3=6, out=2, flag=0; byte counter=0; byte countR=0,countG=0,countB=0; int lectura=0, verde=0, amarillo=0, amarilloup=0, amarillodown=0; int azul=0, rojo=0, verde2=0; void setup () { Serial.begin(115200); pinMode(s0,OUTPUT); pinMode(s1,OUTPUT); pinMode(s2,OUTPUT); pinMode(s3,OUTPUT); pinMode(vuelta,OUTPUT); myservodir.attach(10); myservopuerta.attach(9); } void color () { if (lectura==50){ if (verde2>amarillo){ myservodir.write(65); delay(1000); } else { myservodir.write(150); delay(1000); } lectura=0; verde2=0; amarillo=0; myservopuerta.write(30); delay(1000); myservopuerta.write(160); delay (1000); for(j=0;j<10;j++) { analogWrite(vuelta,240); delay(50); analogWrite(vuelta,0); delay(80); } } }
Me hace falta ayuda urgente porfavor, gracias