DMXSerial icon indicating copy to clipboard operation
DMXSerial copied to clipboard

Arduino Uno Pin 2 Internal Pullup not working

Open Randomaker opened this issue 1 year ago • 1 comments

Hello! I have discovered a bug with this library. It seems that on the Arduino Uno, the internal pullup resistor on pin 2 does not work when this library is being used. I will include a very simple sketch showing the problem below.

It sets pin 2 as an input with pullup. It then reads from that input, and directly outputs it to pin 13 (built in LED on Uno). When pin 2 is not connected to anything, the pullup should keep the pin high, meaning the LED should be ON unless pin 2 is tied to ground. However, it remains OFF unless you tie pin 2 to 5V.

If you comment out the initiation of this library, it works as expected.

Here is the sketch-

#include <DMXSerial.h>

bool inputValue;

void setup() {
  pinMode(2, INPUT_PULLUP);
  pinMode(13, OUTPUT);

  DMXSerial.init(DMXReceiver);
}

void loop() {

  digitalWrite(13, digitalRead(2));
  
}

I am working on a somewhat urgent project using this library, so I would appreciate it if someone could get back to me about this soon, but I understand this is community led, so I understand if it doesn't get fixed right away. Thanks a lot for making this library (and hopefully maintaining it), as it seems to be the only library for receiving DMX, and it works quite well other than this issue.

Randomaker avatar Feb 28 '23 19:02 Randomaker