prog.cpp: In function ‘void setup()’:
prog.cpp:8:5: error: ‘Serial’ was not declared in this scope
Serial.begin(9600);
^~~~~~
prog.cpp:9:14: error: ‘A0’ was not declared in this scope
pinMode( A0, INPUT );
^~
prog.cpp:9:18: error: ‘INPUT’ was not declared in this scope
pinMode( A0, INPUT );
^~~~~
prog.cpp:9:5: error: ‘pinMode’ was not declared in this scope
pinMode( A0, INPUT );
^~~~~~~
prog.cpp: In function ‘void loop()’:
prog.cpp:18:26: error: ‘A0’ was not declared in this scope
raw = analogRead(A0);
^~
prog.cpp:18:15: error: ‘analogRead’ was not declared in this scope
raw = analogRead(A0);
^~~~~~~~~~
prog.cpp:24:5: error: ‘Serial’ was not declared in this scope
Serial.print("average analogRead: "); Serial.println(int(avg));
^~~~~~
prog.cpp:26:5: error: ‘delay’ was not declared in this scope
delay(500);
^~~~~