IRMP-org / IRMP

Infrared Multi Protocol Decoder
GNU General Public License v3.0
274 stars 44 forks source link

Teensy 4.0 - cannot detect IR codes #24

Closed lpaolini closed 3 years ago

lpaolini commented 4 years ago

Bug Report

Arduino Platform

IDE

IR-Protocol

Example to reproduce the issue

Pin(s) used for IR-receive, if not default

22 (tried also 2 and 3)

Version

Current behavior

START src/main.cpp from Oct 7 2020 Using library version 3.3.2 Ready to receive IR signals of protocols: SIRCS, NEC, SAMSUNG, MATSUSH, KASEIKYO, RC5, DENON, RC6, SAMSG32, APPLE, GRUNDIG, NOKIA, SIEMENS, JVC, RC6A, IR60, NEC16, NEC42, ONKYO, at pin 22

No IR code is detected.

Expected behavior

Should detect IR codes.

Error output

No error.

Additional context

Using Teensy 4.0 (Cortex-M7)

ArminJo commented 4 years ago

Is the feedback LED flickering when IR signal is present? Do you have a photo of your circuit?

lpaolini commented 4 years ago

No it's not flickering.

I'm attaching a screenshot of the EAGLE schematics, if this is what you mean. The IR sensor is connected to SV2 (1=signal, 2=+3.3v, 5=GND), while power is connected to SV1.

Screenshot 2020-10-07 at 12 57 11
ArminJo commented 4 years ago

Thanks. It looks good so far. Are you sure the IR signal is delivered at pin 22. Check the pin with static HIGH and LOW level and watch the feedback led, it should change according to the static input signal.

lpaolini commented 4 years ago

Forgot to mention the same code runs perfectly well on Arduino Nano.

lpaolini commented 4 years ago

Yes, I'm sure it's delivered to pin 22 (tried also 2 and 3). Tested with logic analyzer. Nope, if I manually ground pin 22 the feedback led doesn't flicker.

ArminJo commented 4 years ago

OK, now we have two possible reasons.

  1. The program does not really use pin 22 (maybe of strange pin mappings)
  2. the Interrupt routine is not running (more likely) I do not own a Teensy 4 so I can only guess :-( I now have a meeting for 2 hours but I after this I will do some research on it and give you feedback.
lpaolini commented 4 years ago

Thanks. BTW, you should own a Teensy 4, it's awesome! :)

lpaolini commented 3 years ago

Please just let me know if there's any test I can do for you to find out the issue. Thanks.

ArminJo commented 3 years ago

Hi, it takes longer than expected and I am very busy, so it may last until monday. Sorry.

lpaolini commented 3 years ago

No problem. Awesome library and great support, I can wait. Thanks.

ArminJo commented 3 years ago

I uploaded a version with teensyduino support. Default receive pin is 3, I hope thats OK. Can you check, if it is working? Thanks!

lpaolini commented 3 years ago

YES!! It works! Thank you so much for fixing it.

lpaolini commented 3 years ago

By the way, I've tested it on pin 22 only. Please let me know if you need more tests.

ArminJo commented 3 years ago

You would do me a big favor if you could test it on pin 3 too, since this is the default for the library. I do not know if every Teensy board has pin 22, but I assume they all have pin3 😀

lpaolini commented 3 years ago

Sure! I confirm it's working good on default pin 3. Good job!

ArminJo commented 3 years ago

Thanks!