In this project we will simulate a RGB LED with 3 sliders that represent 1 color for each slider. The codes in the sketches remaining the same as the normal sketches but there are just a few things that will be added to the setup in order to communicate though the serial port. Don’t use the old simulator instructions with a capital letter for analogRead and Write. Follow the code below.
Select the used inputs and outputs on the simulator. In this case we use 3 PWM pins for the RGB LED (a PWM signal gives a value between 0-1023 or 0-5 volts) and analog pins A0, A1 and A2 for each color slider. Connect the Arduino with the COM port in the simulator and watch the simulation. The serial port on a Mac is different than on a Windows device. A Windows device will name it COM and a Mac will have something like dev/tty.usb…