Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
monsieurDavid opened this issue Oct 17, 2016 · 3 comments
Closed

Comments

@monsieurDavid
Copy link

monsieurDavid commented Oct 17, 2016

  • Arduino board: Circuit PlayGround Dev. Edition
  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.6.12
  • Steps to reproduce the problem:
    Compile and upload ~/Arduino/libraries/Adafruit_Circuit_Playground/examples/demo.ino
~/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
Copy link
Author

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

@sigmus731
Copy link

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

@jtrombone
Copy link

jtrombone commented Jan 23, 2018

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 <Adafruit_Circuit_Playground.h>
I believe this line is for the specific Adafruit board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants