CP Express IR

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mpc823
 
Posts: 66
Joined: Thu May 05, 2016 9:10 am

CP Express IR

Post by mpc823 »

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

User avatar
mpc823
 
Posts: 66
Joined: Thu May 05, 2016 9:10 am

Re: CP Express IR

Post by mpc823 »

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.

User avatar
mpc823
 
Posts: 66
Joined: Thu May 05, 2016 9:10 am

Re: CP Express IR

Post by mpc823 »

So I think there is an error in the Arduino code in file IRLibSAMD21.h. On line 70 it says,

Code: Select all

#ifdef ADAFRUIT_CIRCUITPLAYGROUND_M0 
when I believe it should be

Code: Select all

#ifdef  ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS
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

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
in the IR examples. After an update, restart and reloading the example code, it changed to

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
So I think a change was being made in the code that didn't get propagated to this file.

Daniel

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: CP Express IR

Post by adafruit_support_mike »

Good detective work!

I'll have the folks who handle that code take a look.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: CP Express IR

Post by adafruit2 »

woosp! fixed :)

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”