Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Timer1 not working in new engine

2 posters

Go down  Message [Page 1 of 1]

1Timer1 not working in new engine Empty Timer1 not working in new engine Sat Feb 06, 2021 5:16 pm

wallysalami

wallysalami

I think Timer1 is still not working on the new engine. When I run this code on SimulIDE 0.5.15 / 0.5.16 with a circuit containing only an Arduino Mega, the setup prints show up in Serial Monitor, but the count doesn't. On 0.4, everything works as expected.

Code:

#define USE_TIMER_1 true
#include <TimerInterrupt.h>

void setup() {
    Serial.begin(9600);
    Serial.println("Serial started!");
    
    ITimer1.init();
    ITimer1.attachInterruptInterval(1000, timerCallback);

    Serial.println("Timer started!");
}

void loop() {
    
}

void timerCallback()
{
    Serial.println("+ 1 second");
}

2Timer1 not working in new engine Empty Re: Timer1 not working in new engine Sat Feb 06, 2021 8:10 pm

arcachofo

arcachofo

You are right.
I will have a look.

3Timer1 not working in new engine Empty Re: Timer1 not working in new engine Mon Feb 08, 2021 3:31 pm

arcachofo

arcachofo

Solved in trunk rev 121 and 0.4.14 rev 38.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum