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

Thread: I programed a interrupt on pins 3 and 4

  1. #1

    I programed a interrupt on pins 3 and 4

    I programed a interrupt on pins 3 and 4 and now I can't program other sketch, the program button does not respond.

    What will be the possible problem?

    How can I program other sketch?

    Reprogram the bootloader?

    I programmed the sketch below into a teensy 3.2 and after that I started having the problem. It used to be normal.

    /* Encoder Library - Basic Example

    This example code is in the public domain.

    #include <Encoder.h>

    // Change these two numbers to the pins connected to your encoder.
    // Best Performance: both pins have interrupt capability
    // Good Performance: only the first pin has interrupt capability
    // Low Performance: neither pin has interrupt capability
    Encoder myEnc(3, 4);
    // avoid using pins with LEDs attached

    void setup() {
    Serial.println("Basic Encoder Test:");

    long oldPosition = -999;

    void loop() {
    long newPosition =;
    if (newPosition != oldPosition) {
    oldPosition = newPosition;
    Last edited by Dianderson Mendonša; 05-15-2019 at 01:57 PM.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Quote Originally Posted by Dianderson Mendonša View Post
    What will be the possible problem?
    How can anyone answer, when we don't even know which Teensy you're using, nor anything about this program other than it used interrupts (which have been used successfully by many thousands of other people).

  3. #3
    Sorry for my lack of attention.

Posting Permissions

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