Just got a CPE and went to try out the IR on the board with this demo code from Adafruit:
https://learn.adafruit.com/infrared-tra ... red-record
This part bombs out on compile/upload:
#if !defined(ADAFRUIT_CIRCUITPLAYGROUND_M0)
#error "Infrared support is only for the Circuit Playground Express, it doesn't work with the Classic version"
#endif
I'm using Arduino IDE: 1.8.13
Board Definitions: Arduino SAMD v 1.8.3
I'm commenting it out for now and it works but I'd prefer it to work properly.
Circuit Playground Express Example #DEFINE
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15659
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Circuit Playground Express Example #DEFINE
Do you have "Circuitplayground Express" selected in the Tools->Board menu?
Dave
Dave
- fscii
- Posts: 4
- Joined: Sat Jul 07, 2018 1:08 pm
Re: Circuit Playground Express Example #DEFINE
Yes.
Board: Adafruit Circuit Playground Express
Port: COM11 (Adafruit Circuit Playground Express)
Board Info:
BN: Adafruit Circuit Playground Express
VID: 239A
PID: 8018
SN: 85F9E49950525231372E3120FF141F20
However I do NOT have a programmer selected out of these 3:
Atmel EDBG
Atmel-ICE
Atmel SAM-ICE
Board: Adafruit Circuit Playground Express
Port: COM11 (Adafruit Circuit Playground Express)
Board Info:
BN: Adafruit Circuit Playground Express
VID: 239A
PID: 8018
SN: 85F9E49950525231372E3120FF141F20
However I do NOT have a programmer selected out of these 3:
Atmel EDBG
Atmel-ICE
Atmel SAM-ICE
- dastels
- Posts: 15659
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Circuit Playground Express Example #DEFINE
The default programmer should be ok. And doesn't impact compiling. According to the guide you should use the USBtinyISP programmer.
Hmm... you have the Adafruit SAMD support installed as well?
No hard done removing that check. It's just to avoid trying to use the IR example on a classic board.
Dave
Hmm... you have the Adafruit SAMD support installed as well?
No hard done removing that check. It's just to avoid trying to use the IR example on a classic board.
Dave
- fscii
- Posts: 4
- Joined: Sat Jul 07, 2018 1:08 pm
Re: Circuit Playground Express Example #DEFINE
TinyUSB isn't an available choice for programmer, only the 3 I listed are present.
I forgot to list the version of Adafruit Circuit Playground Express software library installed. It is 1.11.2, I installed it today and said yes to letting it install all supporting libraries.
I just used Notepad++ to "find in files" the macro "ADAFRUIT_CIRCUITPLAYGROUND_M0" in the C:\Users\fscii\Documents\Arduino\libraries\Adafruit_Circuit_Playground
result: 0 hits in 0 files of 112 searched.
I'm not sure where that macro is supposed to be defined but its not found in the installed library. Looking at library code I don't see any Adafruit code using this macro, in fact I see them doing the opposite and checking this way to see if its an original circuit playground.
#if defined(__AVR__) || \
defined(ARDUINO_NRF52840_CIRCUITPLAY) // Circuit Playground 'classic'
Perhaps the example code I got from the website has an obsolete method of board checking that's no longer used in the libraries?!
I forgot to list the version of Adafruit Circuit Playground Express software library installed. It is 1.11.2, I installed it today and said yes to letting it install all supporting libraries.
I just used Notepad++ to "find in files" the macro "ADAFRUIT_CIRCUITPLAYGROUND_M0" in the C:\Users\fscii\Documents\Arduino\libraries\Adafruit_Circuit_Playground
result: 0 hits in 0 files of 112 searched.
I'm not sure where that macro is supposed to be defined but its not found in the installed library. Looking at library code I don't see any Adafruit code using this macro, in fact I see them doing the opposite and checking this way to see if its an original circuit playground.
#if defined(__AVR__) || \
defined(ARDUINO_NRF52840_CIRCUITPLAY) // Circuit Playground 'classic'
Perhaps the example code I got from the website has an obsolete method of board checking that's no longer used in the libraries?!
- dastels
- Posts: 15659
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Circuit Playground Express Example #DEFINE
It's a compiler flag defined in Arduino/hardware/Adafruit/samd/boards.txt
It sounds like you may not have the ADAFRUIT SAMD board support package installed. You need this in addition to the ARDUINO SAMD board support package.
Dave
It sounds like you may not have the ADAFRUIT SAMD board support package installed. You need this in addition to the ARDUINO SAMD board support package.
Dave
- fscii
- Posts: 4
- Joined: Sat Jul 07, 2018 1:08 pm
Re: Circuit Playground Express Example #DEFINE
I found the Adafruit board installer directions here:
https://learn.adafruit.com/adafruit-cir ... rduino-ide
There's also a definition for the Adafruit Circuit Playground Express in the 'Adafruit' board support package. If you'd like to try that definition for some reason.
I didn't realize the same board had two different definitions (or at least this compiler flag is different).
I'd like to suggest matching the Arduino SAMD board definition of the CPE.
Thanks for your help.
https://learn.adafruit.com/adafruit-cir ... rduino-ide
There's also a definition for the Adafruit Circuit Playground Express in the 'Adafruit' board support package. If you'd like to try that definition for some reason.
I didn't realize the same board had two different definitions (or at least this compiler flag is different).
I'd like to suggest matching the Arduino SAMD board definition of the CPE.
Thanks for your help.
Please be positive and constructive with your questions and comments.