By using Arduino
Arduino IDE code for blinking three LEDs and displaying their outputs: const int LED = 13;  //Assign pin 13 a name e.g. LED void setup()  {  Serial.begin (9600);   //initialise the serial monitor data rate at 9600bps  pinMode(LED, OUTPUT);  //configure the digital pin as an output } void loop()  {       digitalWrite(LED, HIGH);  //control the digital pin to turn the LED on   Serial.println("LED is on"); //receive a signal in the serial monitor to show LED is on   delay(1000);   //a delay to blink the LED in 1 second intervals   digitalWrite(LED, LOW);  //control the digital pin to turn the LED off   Serial.println("LED is off"); //receive a signal in the serial monitor to show LED is off   delay(1000); //a delay to blink the LED in 1 second intervals } Basic arduino code for blinking 3 LEDs(RGB): int R = 12;int G = 11;int B = 10; // Assign integer R,G,B pins to 12,11,10 respectively void setup(){  pinMode  // configure the digital pins R as Output (R,OUTPUT);  pinMode // configure the digital pin R as output (G,OUTPUT);  pinMode // configure the digital pin G as output (B,OUTPUT); } void loop(){  digitalWrite (R,HIGH);  delay (1000);  digitalWrite (R,LOW);  delay (1000);  digitalWrite (G,HIGH);  delay (1000);  digitalWrite (G,LOW);  delay (1000);  digitalWrite (B,HIGH);  delay (1000);  digitalWrite (B,LOW);  delay (1000); } Description: 1.digitalWrite (R,HIGH);  delay (1000); so after  one second we must tell arduino to set pin no” 12” ie” R” to position” low”  which is “OFF”.  2. digitalWrite (R,LOW); This programme will programme three LEDs, R, G, and B, to turn "ON" and "OFF" for an extended period of time. You can also programme more than three LEDs to turn on and off as desired. This tutorial is designed to help newcomers understand the programme and play with Arduino. 3. delay (1000); This is a complete loop for pin 12, which was designated for th ... See the full answer