I just received some Circuit Playground Express boards and tried out the Arduino sketches for IR transmit (Infrared_Transmit) and IR Receive (Infrared_Read). While both boards seem to be able to receive IR from a Remote Control, I can't seem to get either to transmit to the other. I figure I must be doing something wrong. I am using Arduino 1.8.4, have installed the Circuit Playground Express board package. Is there something special that needs to be done?
Daniel
CP Express IR
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mpc823
- Posts: 66
- Joined: Thu May 05, 2016 9:10 am
Re: CP Express IR
So I used the makecode.adafruit.com drag and drop method and was able to confirm that the IR transmit and receive work on both. Seems that the two Circuit Playgrounds shouldn't be directly across from each other, rather they need to be offset from one another. I'm still figuring out exactly how it behaves, but at least I can confirm the HW works.
BTW, the makecode is a really fun way to program stuff up. The event-oriented mechanism that makecode (Javascript) gives you is quite nice.
BTW, the makecode is a really fun way to program stuff up. The event-oriented mechanism that makecode (Javascript) gives you is quite nice.
- mpc823
- Posts: 66
- Joined: Thu May 05, 2016 9:10 am
Re: CP Express IR
So I think there is an error in the Arduino code in file IRLibSAMD21.h. On line 70 it says,
when I believe it should be
My IR sending wasn't working until I made this change. I noticed that when I first installed Arduino 1.8.5, I got example code that had
in the IR examples. After an update, restart and reloading the example code, it changed to
So I think a change was being made in the code that didn't get propagated to this file.
Daniel
Code: Select all
#ifdef ADAFRUIT_CIRCUITPLAYGROUND_M0
Code: Select all
#ifdef ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS
Code: Select all
#if !defined(ADAFRUIT_CIRCUITPLAYGROUND_M0)
#error "Infrared support is only for the Circuit Playground Express, it doesn't work with the Classic version"
#endif
Code: Select all
#if !defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS)
#error "Infrared support is only for the Circuit Playground Express, it doesn't work with the Classic version"
#endif
Daniel
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: CP Express IR
Good detective work!
I'll have the folks who handle that code take a look.
I'll have the folks who handle that code take a look.
Please be positive and constructive with your questions and comments.