LED not glowing/blinking when connected to Resistor and Arduino
rinon13 opened this issue · comments
Phone Khant Kyaw (Tyron) commented
Description: LED is not glowing when either pins (POSITIVE or NEGATIVE) is connected to Arduino's Digital Pins with a resistor in between.
Steps to Reproduce:
- Implement similar circuit as shown.
- Copy .ino code
int NEG_PIN = 12;
void setup(){
pinMode(POS_PIN, OUTPUT);
pinMode(NEG_PIN, OUTPUT);
digitalWrite(NEG_PIN, LOW);
}
void loop(){
digitalWrite(POS_PIN, HIGH);
delay(500);
digitalWrite(POS_PIN, LOW);
delay(500);
}
- Press "Start Simulation"
- LED won't blink as expected in .ino code.
Expected behavior: LED should blink.
Reason for the problem: When a resistor is connected between the LED's pins and the Arduino's digital pins, the LED is unable to fetch the value of the digital pins.
- OS: Ubuntu 22.04.1 LTS
Browser: Firefox 110 (Ubuntu)
Tested on:
- simulation.iitbx.in
- develop
- https://github.com/rinon13/eSim-Cloud/tree/LED_Pin_Connection_Issue (Fixed issue where both NEGATIVE and POSITIVE pins of LED are not working when connected to Digital Pins of Arduino)
Additional Context:
- LED will work as intended (blink in intervals) when NEGATIVE pin is connected to GND instead of a digitally programmed LOW Arduino Pin ( digitalWrite(NEG_PIN, LOW); ).
Firuza Aibara commented
Fixed in #467