Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Timer interrupt problem

  1. #1

    Timer interrupt problem

    Hi,

    I'm trying to define an interrupt that gets executed at given time interval. I found some code to do this but I'm getting an error for redefining pit0_isr:
    IntervalTimer.cpp.o: In function `IntervalTimer::end()':
    C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy3/IntervalTimer.cpp:39: multiple definition of `pit0_isr'
    test.cpp.o:C:\Program Files (x86)\Arduino/test.ino:1: first defined here
    collect2.exe: error: ld returned 1 exit status

    My code is simply as follows:
    Code:
    void pit0_isr() {}
    
    void setup() {}
    
    void loop() {}
    What's the proper way to define a timer interrupt?

    Thanks, Jarkko
    Last edited by JarkkoL; 07-11-2013 at 02:40 AM.

  2. #2
    Ok, got it, I have to use IntervalTimer class instead.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •