Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino Uno Pin 2 Internal Pullup not working #74

Open
Randomaker opened this issue Feb 28, 2023 · 1 comment
Open

Arduino Uno Pin 2 Internal Pullup not working #74

Randomaker opened this issue Feb 28, 2023 · 1 comment

Comments

@Randomaker
Copy link

Randomaker commented Feb 28, 2023

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.

@blockiindahood
Copy link

Seems that pin 2 is used for some kind of data transition, don't really know, sorry :(

#define DMXMODEPIN 2 ///< Arduino pin 2 for controlling the data direction is the default value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants