Skip to content

Interrupts are unknown for this board, please add to this code #92

@parthipanssr

Description

@parthipanssr

Hi I am using the new Arduino Giga R1 Wifi Board as per data sheet all digital pins are interrupt like Arduino Due. when tested the sample program there is no issue when using other Arduino Boards( Uno, Mega).but when I used Arduino Giga R1 the compilation error shows in Arduino IDE. please check the issue and fix.

Hardware & Software

Board: ARDUINO GIGA R1 WIFI
Shields / modules used
Arduino IDE version: 2.1.0
Teensyduino version (if using Teensy): NO
Version info & package name (from Tools > Boards > Board Manager)
Operating system & version: windows 10
Any other software or hardware?
NO

Arduino Sketch

#include <Encoder.h>
Encoder myEnc(46, 47);

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

long oldPosition = -999;

void loop() {
long newPosition = myEnc.read();
if (newPosition != oldPosition) {
oldPosition = newPosition;
Serial.println(newPosition);
}
}

Errors or Incorrect Output

In file included from c:\Users\parth\Documents\Arduino\libraries\Encoder/Encoder.h:46:0,
from C:\Users\parth\Documents\Arduino\encoder_library_example\encoder_library_example.ino:1:
c:\Users\parth\Documents\Arduino\libraries\Encoder/utility/interrupt_pins.h:334:2: error: #error "Interrupts are unknown for this board, please add to this code"
#error "Interrupts are unknown for this board, please add to this code"
^~~~~
c:\Users\parth\Documents\Arduino\libraries\Encoder/utility/interrupt_pins.h:337:2: error: #error "Encoder requires interrupt pins, but this board does not have any :("
#error "Encoder requires interrupt pins, but this board does not have any :("
^~~~~
c:\Users\parth\Documents\Arduino\libraries\Encoder/utility/interrupt_pins.h:338:2: error: #error "You could try defining ENCODER_DO_NOT_USE_INTERRUPTS as a kludge."
#error "You could try defining ENCODER_DO_NOT_USE_INTERRUPTS as a kludge."
^~~~~

exit status 1

Compilation error: exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions