Aim: Display RGB color with LED

Arduino Interface RGB LED.JPG


Digital 11,12,13 are here defined as led output

3led.png


  1. The program starts when the green flag is pressed.
  2. -When the key a is pressed, the LED which is connected to the digital 11
  3. will start blinking for 10 time with a 1 sec delay timing.
  4. -When key q is pressed the LED of digital 12 will in turn get activated for
  5. the same amount of time.
  6. -when m is pressed the message stop is broadcasted which calls another function
  7. to turn all LEDs OFF before to stop all scripts.
  8. When p is pressed all three (3) colors will successively turn ON and OFF continually.

Notice

  1. The LED is a common anode Led therefore when it receives 0 it will turn ON and when it receives1 will turn OFF