Controlling the LED blink rate with the potentiometer and Arduino

Procedure

  • Source
  • Target

NOTE: First make the connections, then move to code compilation.

1. Drag and drop the components in the workspace to create the circuit.

2. Connect Pin 'R' of LED with Pin4 of Breadboard.

3. Connect Pin 'G' of LED with Pin5 of Breadboard.

4. Connect Pin 'B' of LED with Pin6 of Breadboard.

5. Connect Pin1 of breadboard with Pin12 of Arduino.

6. Connect Pin2 of breadboard with Pin9 of Arduino.

7. Connect Pin3 of breadboard with Pin6 of Arduino.

8. Connect Gnd Pin of Arduino with target Pin of LeD.

9. After connections click on the CHECK button to check the connections.

NOTE: Right click on the component to open the dialog box to edit the properties of the component.

10. For the code compiler:

  • Set the pinMode of PIN_RED as “OUTPUT” first.
  • Set the pinMode of PIN_GREEN as “OUTPUT”.
  • Set the pinMode of PIN_BLUE as “OUTPUT”.
  • Then set the RGB colors in setColor fields

11. Now, click on COMPILE button to compile the code.

12. Click on RESET button to reload the webpage