Gemma M0 and IR Remote Arduino IDE

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dovadil
 
Posts: 6
Joined: Mon Apr 02, 2018 2:08 pm

Gemma M0 and IR Remote Arduino IDE

Post by dovadil »

Hello,

I have a Neopixel ring with a Gemma M0 using the Arduino IDE - as that this what I am most comfortable with.
Now I would like to introduce an IR Remote Control but I can't figure out which headers/libraries can work with the Gemma M0.

I tried using the SoftwareSerial.h referenced in the below link, but it seems like the it is not for the Gemma M0...
https://learn.adafruit.com/trinket-gemm ... ir-codes-1

I tried to #include <IRremote.h> referenced in the below link, but it results in...
Error compiling for board Adafruit Gemma M0 (SAMD21)
https://www.circuitbasics.com/arduino-i ... -tutorial/

Please may I have some guidance - see to be going around in circles.

Thanks,
David

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

Re: Gemma M0 and IR Remote Arduino IDE

Post by adafruit_support_mike »

The Gemma M0 doesn't support SoftwareSerial.. it isn't necessary, especially for the code you linked.

SoftwareSerial is a hack for boards that only have one hardware Serial interface like the ATmega328, or don't have one at all like the ATtiny85. The linked code uses its SoftwareSerial interface to talk to a computer through a USB-to-Serial cable. That part of the code isn't related to the IR part at all.

The Gemma M0 uses a SAMD21 microcontroller, which handles USB communication internally and creates the Serial interface to the computer in software. You can use functions like Serial.print() normally, without needing to set up the interface.

User avatar
dovadil
 
Posts: 6
Joined: Mon Apr 02, 2018 2:08 pm

Re: Gemma M0 and IR Remote Arduino IDE

Post by dovadil »

Thanks Mike,

That explains that, but is there a way I can get an IR remote working?

Including the <IRremote.h> results in...
Error compiling for board Adafruit Gemma M0 (SAMD21)

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

Re: Gemma M0 and IR Remote Arduino IDE

Post by adafruit_support_mike »

IRremote.h is written for 8-bit AVR microcontrollers. It won't work with 32-bit SAMD microcontrollers.

The code in the tutorial you linked doesn't use IRremote.h. It should port to the Gemma M0 without any problems.

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

Return to “Wearables”