cyborg5 / IRLib2

Library for receiving, decoding, and sending infrared signals using Arduino
GNU General Public License v3.0
384 stars 138 forks source link

Trinket M0 pins 3 and 4 as well as Gemma M0 pin 2 do not work #44

Open cyborg5 opened 6 years ago

cyborg5 commented 6 years ago

I'm opening this issue myself to highlight a known problem. I cannot get PWM output on Trinket M0 pin 3. It is connected to hardware pin PA07 which is identical to pin 9 on Arduino Zero, Arduino M0 Pro, and Adafruit Feather M0 boards all of which work. But for some reason PA07 on the Trinket M0 does not work. Similarly Trinket M0 pin 4 is connected to hardware pin PA06 which is identical to pin 8 on the Arduino Zero and Arduino M0 Pro and those work perfectly but not on the Trinket M0.

The Gemma M0 should support PWM on its pin 2 but I cannot get it to work. It's connected to hardware pin PA05 which I have not used elsewhere but the code should still work.

Anyone with suggestions your help is much appreciated. We went ahead and released the code because pin 0 works okay on both boards and 2 works okay on the Trinket M0.

l8gravely commented 5 years ago

This is really really late, but on the GemmaM0, are you talking about A1/D2, A2/D0 or D1/A0 pin on the board when you talk about this issue? I'll track it down more myself once I'm home and can look at my working board, but current test setup in front of me gave me:

Traceback (most recent call last): File "main.py", line 130, in File "/lib/IRLib_P01_NECs.py", line 18, in send File "/lib/IRLibSendBase.py", line 55, in sendGeneric File "/lib/IRLibSendBase.py", line 14, in enableIROut ValueError: Invalid pin

Adafruit CircuitPython 2.2.4 on 2018-03-07; Adafruit Gemma M0 with samd21e18

Where my initialization code looks like this:

 myS = IRLib_P01_NECs.IRsendNEC(board.D1)

Where it had worked properly with board.D0 before. Time to investigate more. Thanks for your work!