4 -Display colors with RGB LED
Aim: Display RGB color with LED
Digital 11,12,13 are here defined as led output
- The program starts when the green flag is pressed.
- -When the key a is pressed, the LED which is connected to the digital 11
- will start blinking for 10 time with a 1 sec delay timing.
- -When key q is pressed the LED of digital 12 will in turn get activated for
- the same amount of time.
- -when m is pressed the message stop is broadcasted which calls another function
- to turn all LEDs OFF before to stop all scripts.
- When p is pressed all three (3) colors will successively turn ON and OFF continually.
Notice
- The LED is a common anode Led therefore when it receives 0 it will turn ON and when it receives1 will turn OFF