On Saturday, August 13, 2022 we will be working on the Adafruit Customer Support Forums. If you visit over the weekend and things are not complete yet, please check back later, https://adafruit.com/forumupdates
0

Gemma M0 and IR Remote Arduino IDE
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Gemma M0 and IR Remote Arduino IDE

by dovadil on Fri Jun 24, 2022 5:02 pm

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

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

Re: Gemma M0 and IR Remote Arduino IDE

by adafruit_support_mike on Tue Jun 28, 2022 6:44 pm

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.

adafruit_support_mike
 
Posts: 64984
Joined: Thu Feb 11, 2010 2:51 pm

Re: Gemma M0 and IR Remote Arduino IDE

by dovadil on Wed Jun 29, 2022 8:49 am

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)

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

Re: Gemma M0 and IR Remote Arduino IDE

by adafruit_support_mike on Wed Jun 29, 2022 9:03 pm

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.

adafruit_support_mike
 
Posts: 64984
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.