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

RGB LED Cathode pin issue

rinon13 opened this issue · comments

Description: The Cathode pin of RGB LED should only be connected to the GND pin or a digitally programmed 0 pin for RGB LED to work. In scenarios mentioned below, it is working when connected to any pin.

image
Cathode pin

Scenarios:

RGB_LED_Unconnected_Resistor
Cathode pin connected to an unconnected resistor

RGB_LED_5V
Cathode pin connected to a 5V pin

Steps to Reproduce

  1. Connect as shown above
  2. Copy .ino code
void setup(){
	pinMode(11, OUTPUT);
	pinMode(9, OUTPUT);
	pinMode(7, OUTPUT);
}

void loop(){
	for(int i=1;i<=7;++i){
        digitalWrite(11, i&1);
        digitalWrite(9, (i>>1)&1);
        digitalWrite(7, (i>>2)&1);
        delay(1000);
    }
}
  1. Press "Start Simulation"
  2. RGB LED will work

Expected Behavior:Should only work when Cathode pin is connected to GND or digitally programmed LOW (0) pin.

RGB LED.webm
Video of above scenarios

Version and OS:

  • OS: Ubuntu 22.04.1 LTS
  • Browser: Firefox 110

Tested on

  • develop
  • simulation.iitbx.in

fixed in #481