frg-fossee / eSim-Cloud

A web-based system for designing and simulating electronic (eSim) and Arduino circuits.

Home Page:https://esim-cloud.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LED not glowing/blinking when connected to Resistor and Arduino

rinon13 opened this issue · comments

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:

LED_Resistor_AllDigitalPins

  1. Implement similar circuit as shown.
  2. 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);
}
  1. Press "Start Simulation"
  2. 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:

Additional Context:

  1. 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); ).

LED_Blink_Issue2

Fixed in #467