Since re-install of Arduino 1.05 and Teensyduino 1.14, I am unable to service interrupts by IntervalTimer on Teensy 3.0.
Here is a stripped down sketch I think should work. Could someone with a Teensy 3.0 please run it and reply if the LED goes OFF after 1 second?
void smpltimerisr(void);
const int ledPin = 13; // Teensy3 has LED on 13
volatile unsigned long smplidx = 0;
void setup(){
pinMode(ledPin, OUTPUT);
IntervalTimer smpltimer;
smplidx = 0;
smpltimer.begin(smpltimerisr, 1000000);
}
void loop(){
if(smplidx == 0)
digitalWrite(ledPin, HIGH);
else
digitalWrite(ledPin, LOW);
}
void smpltimerisr(void)
{
smplidx++;
}
//The above compiles fine, loads and executes, but the LED stays ON, indicating no interrupts active; any ideas?
Here is a stripped down sketch I think should work. Could someone with a Teensy 3.0 please run it and reply if the LED goes OFF after 1 second?
void smpltimerisr(void);
const int ledPin = 13; // Teensy3 has LED on 13
volatile unsigned long smplidx = 0;
void setup(){
pinMode(ledPin, OUTPUT);
IntervalTimer smpltimer;
smplidx = 0;
smpltimer.begin(smpltimerisr, 1000000);
}
void loop(){
if(smplidx == 0)
digitalWrite(ledPin, HIGH);
else
digitalWrite(ledPin, LOW);
}
void smpltimerisr(void)
{
smplidx++;
}
//The above compiles fine, loads and executes, but the LED stays ON, indicating no interrupts active; any ideas?