Line 19: Line 19:
 
  -when '''m''' is pressed the message '''stop''' is broadcasted which calls another function
 
  -when '''m''' is pressed the message '''stop''' is broadcasted which calls another function
 
  to turn all LEDs '''OFF''' before to '''stop all scripts'''.
 
  to turn all LEDs '''OFF''' before to '''stop all scripts'''.
  When '''p''' is pressed all three (3) color will successively turn '''ON''' and '''OFF''' continually.
+
  When '''p''' is pressed all three (3) colors will successively turn '''ON''' and '''OFF''' continually.
 
    
 
    
 
'''''Notice'''''
 
'''''Notice'''''
 
  The LED is a common anode Led therefore  when it receives '''0''' it will '''turn ON ''' and when it receives'''1''' will '''turn OFF'''
 
  The LED is a common anode Led therefore  when it receives '''0''' it will '''turn ON ''' and when it receives'''1''' will '''turn OFF'''

Latest revision as of 20:49, 12 January 2015


Aim: Display RGB color with LED

Arduino Interface RGB LED.JPG


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

3led.png


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