adafruit / Adafruit_CircuitPlayground

library for Circuit Playground board
172 stars 77 forks source link

'analogPinToChannel' not declared in scope : Adafruit_CPlay_Mic.cpp #14

Closed monsieurDavid closed 8 years ago

monsieurDavid commented 8 years ago
~/Arduino/libraries/Adafruit_Circuit_Playground/utility/Adafruit_CPlay_Mic.cpp: In member function 'int Adafruit_CPlay_Mic::peak(uint16_t)':
~/Arduino/libraries/Adafruit_Circuit_Playground/utility/Adafruit_CPlay_Mic.cpp:27:37: error: 'analogPinToChannel' was not declared in this scope
   channel     = analogPinToChannel(4); // Pin A4 to ADC channel
                                     ^
~/Arduino/libraries/Adafruit_Circuit_Playground/utility/Adafruit_CPlay_Mic.cpp: In member function 'void Adafruit_CPlay_Mic::capture(int16_t*, uint8_t)':
~/Arduino/libraries/Adafruit_Circuit_Playground/utility/Adafruit_CPlay_Mic.cpp:84:37: error: 'analogPinToChannel' was not declared in this scope
   channel     = analogPinToChannel(4); // Pin A4 to ADC channel
                                     ^
exit status 1
Error compiling for board Arduino/Genuino Uno.
monsieurDavid commented 8 years ago

My mistake - was uploading to wrong board. Nothing to see. Move along.

sigmus731 commented 7 years ago

What exactly do you mean by saying the wrong board? Sorry, but i'm just starting to learn about arduino programming.

jtrombone commented 6 years ago

I found that on my Bare-Bones board (I use the Arduino/Genuino Uno board option) I just had to comment out the line: //#include I believe this line is for the specific Adafruit board.