I am very new to programing and playing with Arduino. I finally got this program to have no errors on Verify. So I try uploading it to the board and I get the error below
/*Programming Logic
Assign an array of nine photo cells as follows:
0 1 2
3 4 5
6 7 8 */
int cells[9];
int b;
int now;
// read values into array and display them
void setup(void) {
// We'll send debugging information via the Serial monitor
Serial.begin(9600);
}
//int b;
void bright(void)
{
for(now=0; now<9; ++now)
{
b=analogRead(now);
cells[now]= b;
Serial.print("Analog reading = ");
Serial.println(b);}
// delay(100);
//this may not be all that is needed to display them? %D maybe
// Scan all and find brightest:
b = cells[0];
for (now=1; now<9; now++)
{
if( cells[now]> b) b = cells[now];
Serial.print("brightest = ");
Serial.println(b);
}
}
/*
If brightest=4 then movedelay else
If brightest=1then movedr
If brightest=2 then moved
If brightest=3 then movedl
If brightest=4 then mover
If brightest=6then movel
If brightest=7 then moveur
If brightest=8 then moveu
If brightest=49then moveul end else
*/
This is the error. I haven't had any luck with poking through the settings. Advice will be welcome. Please and thank you.
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
C:\Users\SIMULA~1\AppData\Local\Temp\cchvSO4S.ltrans0.ltrans.o: In function `main':
cchvSO4S.ltrans0.o:(.text.startup+0x14a): undefined reference to `loop'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
Invalid library found in C:\Users\Simulator\Documents\Arduino\libraries\Solar_cell_test: C:\Users\Simulator\Documents\Arduino\libraries\Solar_cell_test
Invalid library found in C:\Users\Simulator\Documents\Arduino\libraries\Solar_cell_test: C:\Users\Simulator\Documents\Arduino\libraries\Solar_cell_test
Invalid library found in C:\Users\Simulator\Documents\Arduino\libraries\Solar_cell_test: C:\Users\Simulator\Documents\Arduino\libraries\Solar_cell_test
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Also, if this is in the wrong area, I am sorry