Cuando abro el programa de arduino y pulso el boton de lectura al rato me aparece el siguiente error:
core.a(main.cpp.o): In function main': D:\...........\arduino-0022\arduino-0022\hardware\arduino\cores\arduino/main.cpp:7: undefined reference to setup'
D:...........\arduino-0022\arduino-0022\hardware\arduino\cores\arduino/main.cpp:10: undefined reference to `loop'
Tambien me sale cuando voy a grabar alguna librería.
setup y loop son las funciones principales que deben estar en cualquier programa que hagamos.
setup lo ejecuta tan solo 1 vez, y loop se ejecutará secuencialmente una y otra vez.
si es un archivo de ejemplo el que tienes y te sigue dando error es posible que la ruta donde lo tengas sea demasiado larga, prueba a cambiar la carpeta de arduino al directorio raiz.
int led[10] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; // Assign the pins for the leds
int leftChannel = 0; // left channel input
int left, i;
void setup()
{
for (i = 0; i < 10; i++) // Tell the arduino that the leds are digital outputs
pinMode(led*, OUTPUT);* // Serial.begin(9600); // Uncomment to enable troubleshooting over serial. } void loop() { left = analogRead(leftChannel); // read the left channel // Serial.println(left); // uncomment to check the raw input. left = left / 50; // adjusts the sensitivity // Serial.println(left); // uncomment to check the modified input. // left = 1500; // uncomment to test all leds light. // left = 0; // uncomment to check the leds are not lit when the input is 0.
if (left == 0) // if the volume is 0 then turn off all leds*
{*
for(i = 0; i < 10; i++)*
{*
_ digitalWrite(led*, LOW);_
_ }_
_ }*_
* else* * {* * for (i = 0; i < left; i++) // turn on the leds up to the volume level* * {* _ digitalWrite(led*, HIGH); }*_
* for(i = i; i < 10; i++) // turn off the leds above the voltage level* * {* _ digitalWrite(led*, LOW); } } }* Ya he hecho muchos proyectos con el Arduino pero ahora me ha salido este error._