0% found this document useful (0 votes)
30 views2 pages

Experiment No. 2: Multi-Color Switching Connection:: Microprocessor

This experiment involves using an Arduino to switch LED lights between red, green, and blue colors. It defines pin connections for red, green, and blue LEDs and sets those pins as outputs in setup. The loop then uses the setColor function to light each color for 1 second, printing the color name to the serial monitor, before moving to the next color. This cycles through red, green, and blue lights using an Arduino.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views2 pages

Experiment No. 2: Multi-Color Switching Connection:: Microprocessor

This experiment involves using an Arduino to switch LED lights between red, green, and blue colors. It defines pin connections for red, green, and blue LEDs and sets those pins as outputs in setup. The loop then uses the setColor function to light each color for 1 second, printing the color name to the serial monitor, before moving to the next color. This cycles through red, green, and blue lights using an Arduino.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

MICROPROCESSOR

EXPERIMENT NO. 2 : Multi-Color Switching


Connection:

Codings:
int RED=9,GREEN=10,BLUE=11; delay(1000);
void setup() }
{
pinMode(RED,OUTPUT);
pinMode(GREEN,OUTPUT);
pinMode(BLUE,OUTPUT);
Serial.begin(9600);
}
void loop()
{
Serial.println("RED");
setColor(255,0,0);
delay(1000);
Serial.println("GREEN");
setColor(0,255,0);
delay(1000);
Serial.println("BLUE");
setColor(0,0,255);
MICROPROCESSOR

You might also like