我正在研究arduino(uno)谈话时钟项目。我正在使用此网站上的代码:https://learn.adafruit.com/wave-shield-talking-clock/overview
当我收到以下错误时添加WaveHC库:
Arduino:1.6.6 (Windows 10), Card:"Arduino/Genuino Uno"
TalkingClock:44: error: no matching function for call to 'WaveHC::WaveHC()'
WaveHC wave;
^
\Arduino\TalkingClock\TalkingClock.ino:44:12: note: candidates are:
In file included from \Arduino\TalkingClock\TalkingClock.ino:26:0:
\Arduino\libraries\WaveHC/WaveHC.h:113:3: note: WaveHC::WaveHC(HardwareSerial&)
WaveHC(HardwareSerial& serial);
^
\Arduino\libraries\WaveHC/WaveHC.h:113:3: note: candidate expects 1 argument, 0 provided
\Arduino\libraries\WaveHC/WaveHC.h:77:7: note: constexpr WaveHC::WaveHC(const WaveHC&)
class WaveHC
^
\Arduino\libraries\WaveHC/WaveHC.h:77:7: note: candidate expects 1 argument, 0 provided
\Arduino\libraries\WaveHC/WaveHC.h:77:7: note: constexpr WaveHC::WaveHC(WaveHC&&)
\Arduino\libraries\WaveHC/WaveHC.h:77:7: note: candidate expects 1 argument, 0 provided
TalkingClock:64: error: variable 'hours' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
*hours[] = { h12, h01, h02, h03, h04, h05, h06, h07, h08, h09, h10, h11 },
^
TalkingClock:65: error: variable 'mTens' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
*mTens[] = { m00, m10, m20, m30, m40, m50 },
^
TalkingClock:66: error: variable 'mTeens' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
*mTeens[] = { m11, m12, m13, m14, m15, m16, m17, m18, m19 },
^
TalkingClock:67: error: variable 'mTenX' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
*mTenX[] = { m0x, NULL, m2x, m3x, m4x, m5x },
^
TalkingClock:68: error: variable 'mins' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
*mins[] = { m1, m2, m3, m4, m5, m6, m7, m8, m9 },
^
TalkingClock:69: error: variable 'ampm' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
*ampm[] = { am, pm };
^
exit status 1
no matching function for call to 'WaveHC::WaveHC()'