Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.7.3 Does not work with Teensy #3

Open
NicoHood opened this issue Dec 2, 2014 · 13 comments
Open

V1.7.3 Does not work with Teensy #3

NicoHood opened this issue Dec 2, 2014 · 13 comments

Comments

@NicoHood
Copy link
Owner

NicoHood commented Dec 2, 2014

The Code compiles with warnings but doesn't work. Splitted this issue: #2

@TomD62
Copy link

TomD62 commented Dec 4, 2014

Running the ARM based Teensy 3.0 and 3.1 boards
With 1.0.6 Arduino IDE (IDE 1.5.x not supported by Teensy 3.x)
No IRLavailable detected, I've tried Pin 0,1,2,11,13 .
On pin 13, I can see the LED being driven by the IR sensor flicker when I press a remote
What demo would be best for debugging this?

@NicoHood
Copy link
Owner Author

NicoHood commented Dec 4, 2014

Hi Tom,
the No Blocking Demo seems to be the best for debugging. I just don't know anything about a Teensy and dont know how it manages the Interrupts etc.

I first would just add a Serial print in the ISR attached function for interrupt managing. I know "never print in ISRs" but you can do this to simply know if the ISR itself is triggering.

You can also test the Raw demo, it it triggers and see what this does. Then you have to check if the timings are correct.

@TomD62
Copy link

TomD62 commented Dec 4, 2014

This code does work:
// toggles LED when interrupt pin changes state
// for much more detail on Interrupts and ISRs http://gammon.com.au/interrupts
int pin = 13;
volatile int state = LOW; // http://arduino.cc/en/Reference/Volatile

void setup()
{
pinMode(11, INPUT);
pinMode(pin, OUTPUT);
attachInterrupt(11, blink, CHANGE);
// interrupt 0 on an Uno is Pin 2 http://arduino.cc/en/Reference/AttachInterrupt
// the ISR is blink()
// the mode is CHANGE
}

void loop()
{
digitalWrite(pin, state);
}

void blink()
{
state = !state;
}

@NicoHood
Copy link
Owner Author

NicoHood commented Dec 6, 2014

Sorry Tom, you have to dig into that yourself unless I own a Teensy. I could suggest you things to debug, but this would take ages, also without a logic analyzer :S

@TomD62
Copy link

TomD62 commented Dec 7, 2014

I tried a generic ISR, it works on whatever pin I attach it to with the
Teensy3.

I think my plan will be to compile both and have a look at the .elf
assembly code,
or simplify yours by flattening the ISR to a simple function call instead
of the template code.
I tried just putting a LED blink in the ISR, but declarations and scope are
tripping me up.
My C++ is pretty limited, having a hard time following all the template
syntax.
Assembler, I can follow that :)

On Sat, Dec 6, 2014 at 11:38 AM, Nico [email protected] wrote:

Sorry Tom, you have to dig into that yourself unless I own a Teensy. I
could suggest you things to debug, but this would take ages, also without a
logic analyzer :S


Reply to this email directly or view it on GitHub
#3 (comment).

@Jerware
Copy link

Jerware commented Mar 10, 2015

It would be great to see this library working on Teensy 3.1. I would be happy to donate $20 to the cause (the cost of a Teensy).

@NicoHood
Copy link
Owner Author

I already own a Teensy (someone else donated it). Feel free to donate anyways (maybe for a Teensy LC or just for motivation?) ;D

I am sorry, that it doesnt work yet. I have so many personal things at the moment and 6 private coding projects. So I cannot cut me into pieces :D I have this teensy for 1 or 2 Month now and I didnt even had the chance to upload a blink to it. But thx for the reminder. Sometimes I get accidently interest in working on another project again. I wont be able to access any of my Arduinos till next monday. You could remind me on Monday and I'll maybe have a quick look. Maybe the fix is easier as expected. Shouldnt be too complicated.

Jerware, at what protocol are you looking for? So I know what priority I can set ;)

@Jerware
Copy link

Jerware commented Mar 10, 2015

Thanks, NicoHood. I already wired up a workaround (another Teensy acting as IR receiver that transmits codes as Serial data). Before doing that I posted to the Teensy forum to see if anyone had interest in porting your code, and it seems that while your implementation makes great sense on Arduino, it makes less sense on Teensy. A proper port would effectively be a different approach entirely, which probably warrants its own library.

You can see the thread here:
https://forum.pjrc.com/threads/28001-IRLremote-(not-IRremote)-Compatibility

@NicoHood
Copy link
Owner Author

Thx for the link. Well that could be true. I'll have a look at it anyways just to see if it works. Maybe I get net ideas then ;)

@NicoHood
Copy link
Owner Author

NicoHood commented Oct 7, 2015

Is anyone willing to test the dev2 branch for Teensy?
If it throws compile errors a full list of them would be nice.
IDE1.6.6 is required, not sure if Teensy supports this.

I do have a Teensy hardware though, but not here atm. and I also cannot use a patched IDE version, since I am working at the bleeding edge of the IDE and report bugs/help developing.

Same goes for the ESP. If anyone is willing to test it and open a PR to fix compile errors, feel free.
CC @probonopd

@bam80
Copy link

bam80 commented Oct 14, 2015

What Teensy's this issue about - ARM or AVR based?
I would test it on ARM but I haven't one currently

@NicoHood
Copy link
Owner Author

Teensy is ARM and I never used ARM. I have one but I dont intend to use it. Just got no time and use for it. (Teensy 3.1)

@jpk73
Copy link

jpk73 commented Nov 30, 2023

Successfully running on Teensy2! But can't decode B&O codes especially the ones that are repeated back to back. Tried various settings for timeout etc. but couldn't get it to recognize the commands properly (using a genuine 455kHz receiver)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants