Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

attachInterrupt() always pulls pin HIGH #77

Open
@rmlearney-digicatapult

Description

@rmlearney-digicatapult

Hi,

I'm trying to set an interrupt based on detecting a RISING edge using the BLE33. However, the pin reads HIGH after startup. Same happens with pinMode(buttonPin, INPUT_PULLDOWN) followed by attachInterrupt(). It's the attachInterrupt() that pulls it HIGH.

Am I doing something wrong or misunderstanding what's going on here?

const uint8_t buttonPin = 9;

void setup(){
  pinMode(buttonPin, INPUT_PULLDOWN);
  attachInterrupt(digitalPinToInterrupt(buttonPin), buttonISR, RISING);
}

void loop(){}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions