prog.c: In function ‘setup’:
prog.c:20:3: warning: implicit declaration of function ‘pinMode’ [-Wimplicit-function-declaration]
pinMode(LED_BUILTIN, OUTPUT);
^~~~~~~
prog.c:20:11: error: ‘LED_BUILTIN’ undeclared (first use in this function)
pinMode(LED_BUILTIN, OUTPUT);
^~~~~~~~~~~
prog.c:20:11: note: each undeclared identifier is reported only once for each function it appears in
prog.c:20:24: error: ‘OUTPUT’ undeclared (first use in this function)
pinMode(LED_BUILTIN, OUTPUT);
^~~~~~
prog.c:21:7: error: unknown type name ‘byte’
for(byte i=0;i<4;i++)
^~~~
prog.c:23:3: error: ‘Serial’ undeclared (first use in this function)
Serial.begin(115200);
^~~~~~
prog.c:24:7: error: unknown type name ‘byte’
for(byte i=0;i<3;i++){
^~~~
prog.c:25:5: warning: implicit declaration of function ‘allLed’ [-Wimplicit-function-declaration]
allLed(1,250);
^~~~~~
prog.c:28:3: warning: implicit declaration of function ‘delay’ [-Wimplicit-function-declaration]
delay(1000);
^~~~~
prog.c:29:3: warning: implicit declaration of function ‘randomSeed’ [-Wimplicit-function-declaration]
randomSeed(analogRead(A5));
^~~~~~~~~~
prog.c:29:14: warning: implicit declaration of function ‘analogRead’ [-Wimplicit-function-declaration]
randomSeed(analogRead(A5));
^~~~~~~~~~
prog.c:29:25: error: ‘A5’ undeclared (first use in this function)
randomSeed(analogRead(A5));
^~
prog.c:31:6: warning: implicit declaration of function ‘millis’ [-Wimplicit-function-declaration]
ts=millis();
^~~~~~
prog.c: In function ‘loop’:
prog.c:37:9: warning: implicit declaration of function ‘random’ [-Wimplicit-function-declaration]
onLed=random(4);
^~~~~~
prog.c:38:3: warning: implicit declaration of function ‘setLed’; did you mean ‘setup’? [-Wimplicit-function-declaration]
setLed(onLed);
^~~~~~
setup
prog.c:40:3: warning: implicit declaration of function ‘game1’ [-Wimplicit-function-declaration]
game1();
^~~~~
prog.c:42:5: warning: implicit declaration of function ‘endGame’ [-Wimplicit-function-declaration]
endGame();
^~~~~~~
prog.c:44:3: warning: implicit declaration of function ‘dsp’ [-Wimplicit-function-declaration]
dsp();
^~~
prog.c: At top level:
prog.c:57:6: warning: conflicting types for ‘endGame’
void endGame(){
^~~~~~~
prog.c:42:5: note: previous implicit declaration of ‘endGame’ was here
endGame();
^~~~~~~
prog.c: In function ‘endGame’:
prog.c:58:3: error: ‘Serial’ undeclared (first use in this function)
Serial.println("-- Game over ---");
^~~~~~
prog.c: In function ‘game1’:
prog.c:70:5: warning: implicit declaration of function ‘getAd’ [-Wimplicit-function-declaration]
getAd();
^~~~~
prog.c:71:9: error: unknown type name ‘byte’
for(byte i=0;i<4;i++){
^~~~
prog.c: At top level:
prog.c:89:6: warning: conflicting types for ‘dsp’
void dsp(){
^~~
prog.c:44:3: note: previous implicit declaration of ‘dsp’ was here
dsp();
^~~
prog.c: In function ‘dsp’:
prog.c:91:3: warning: implicit declaration of function ‘sprintf’ [-Wimplicit-function-declaration]
sprintf(buf,"score: %d miss: %d\n",hit,miss);
^~~~~~~
prog.c:91:3: warning: incompatible implicit declaration of built-in function ‘sprintf’
prog.c:91:3: note: include ‘<stdio.h>’ or provide a declaration of ‘sprintf’
prog.c:1:1:
+#include <stdio.h>
#define LED 4
prog.c:91:3:
sprintf(buf,"score: %d miss: %d\n",hit,miss);
^~~~~~~
prog.c:92:3: error: ‘Serial’ undeclared (first use in this function)
Serial.print(buf);
^~~~~~
prog.c: At top level:
prog.c:95:6: warning: conflicting types for ‘getAd’
void getAd(){
^~~~~
prog.c:70:5: note: previous implicit declaration of ‘getAd’ was here
getAd();
^~~~~
prog.c: In function ‘getAd’:
prog.c:96:3: error: unknown type name ‘byte’
byte i;
^~~~
prog.c:2:13: error: ‘A0’ undeclared (first use in this function)
#define SEN A0
^~
prog.c:99:20: note: in expansion of macro ‘SEN’
d=analogRead(i+SEN);
^~~
prog.c: At top level:
prog.c:105:6: warning: conflicting types for ‘setLed’
void setLed(int n){
^~~~~~
prog.c:38:3: note: previous implicit declaration of ‘setLed’ was here
setLed(onLed);
^~~~~~
prog.c: In function ‘setLed’:
prog.c:106:7: error: unknown type name ‘byte’
for(byte i=0;i<4;i++)
^~~~
prog.c:107:5: warning: implicit declaration of function ‘digitalWrite’ [-Wimplicit-function-declaration]
digitalWrite(i+LED,LOW);
^~~~~~~~~~~~
prog.c:107:24: error: ‘LOW’ undeclared (first use in this function)
digitalWrite(i+LED,LOW);
^~~
prog.c:109:24: error: ‘HIGH’ undeclared (first use in this function)
digitalWrite(n+LED,HIGH);
^~~~
prog.c: At top level:
prog.c:112:13: error: unknown type name ‘byte’
void allLed(byte n,int t){
^~~~