|
Arduino:1.8.5 (Windows 7), 开发板:"Arduino/Genuino Uno"
C:\Users\Administrator\Desktop\arduino\ArduinoCookbook2E_chengxu\ch04\ch4r11\ch4r11.ino: In function 'void setup()':
ch4r11:20: error: 'nunchuckSetPowerpins' was not declared in this scope
nunchuckSetPowerpins();
^
ch4r11:21: error: 'nunchuckInit' was not declared in this scope
nunchuckInit(); // send the initialization handshake
^
ch4r11:22: error: 'nunchuckRead' was not declared in this scope
nunchuckRead(); // ignore the first time
^
C:\Users\Administrator\Desktop\arduino\ArduinoCookbook2E_chengxu\ch04\ch4r11\ch4r11.ino: In function 'void loop()':
ch4r11:27: error: 'nunchuckRead' was not declared in this scope
nunchuckRead();
^
ch4r11:29: error: 'wii_btnC' was not declared in this scope
boolean btnC = nunchuckGetValue(wii_btnC);
^
ch4r11:29: error: 'nunchuckGetValue' was not declared in this scope
boolean btnC = nunchuckGetValue(wii_btnC);
^
ch4r11:30: error: 'wii_btnZ' was not declared in this scope
boolean btnZ = nunchuckGetValue(wii_btnZ);
^
ch4r11:33: error: 'wii_accelX' was not declared in this scope
offsetX = 127 - nunchuckGetValue(wii_accelX) ;
^
ch4r11:34: error: 'wii_accelY' was not declared in this scope
offsetY = 127 - nunchuckGetValue(wii_accelY) ;
^
ch4r11:37: error: 'wii_accelX' was not declared in this scope
printAccel(nunchuckGetValue(wii_accelX),offsetX) ;
^
ch4r11:38: error: 'wii_accelY' was not declared in this scope
printAccel(nunchuckGetValue(wii_accelY),offsetY) ;
^
exit status 1
'nunchuckSetPowerpins' was not declared in this scope
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
开始时是没有那个库函数,后面添加了还是出现了问题,不知道这个应该怎么弄了。。。
|
-
我是看书上P114页的程序,在网上下的程序,编译时就出了这个问题
|