Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

int LED_Red = 13; int LED_Green = 12; int LED_Blue = 11; int Pin_LED_Red = 3; int Pin_LED_Blue = 5; int Pin_LED_Green = 6; int

int LED_Red = 13;
int LED_Green = 12;
int LED_Blue = 11;
int Pin_LED_Red = 3;
int Pin_LED_Blue = 5;
int Pin_LED_Green = 6;
int potPin1 = A0;
int potPin2 = A1;
int potPin3 = A2;
void setup() {
pinMode(LED_Red, OUTPUT);
pinMode(LED_Blue, OUTPUT);
pinMode(LED_Green, OUTPUT);
pinMode(Pin_LED_Red, OUTPUT);
pinMode(Pin_LED_Blue, OUTPUT);
pinMode(Pin_LED_Green, OUTPUT);
pinMode(potPin1, INPUT);
pinMode(potPin2, INPUT);
pinMode(potPin3, INPUT);
Serial.begin(9600);
}
void loop() {
int Input_Color1 = analogRead(potPin1);
int Input_Color2 = analogRead(potPin2);
int Input_Color3 = analogRead(potPin3);
Input_Color1 = map(Input_Color1, 0, 1023, 0, 255);
Input_Color2 = map(Input_Color2, 0, 1023, 0, 255);
Input_Color3 = map(Input_Color3, 0, 1023, 0, 255);
analogWrite(Pin_LED_Red, Input_Color1);
analogWrite(Pin_LED_Blue, Input_Color2);
analogWrite(Pin_LED_Green, Input_Color3);
analogWrite(LED_Red, Input_Color1);
analogWrite(LED_Blue, Input_Color2);
analogWrite(LED_Green, Input_Color3);
serialRed();
serialBlue();
serialGreen();
}
void serialRed (){
int Value_Red = analogRead(A0);
Serial.println(Value_Red);
delay(200);
}
void serialBlue () {
int Value_Blue = analogRead(A1);
Serial.println(Value_Blue);
delay(200);
}
void serialGreen (){
int Value_Green = analogRead(A2);
Serial.println(Value_Green);
delay(200);
}
Whats the flow chart of this?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

5. Structure your speech to make it easy to listen to

Answered: 1 week ago

Question

Please show your work on Excel. Question 1 A and B

Answered: 1 week ago

Question

1. How do most insects respire ?

Answered: 1 week ago

Question

Who is known as the father of the indian constitution?

Answered: 1 week ago

Question

1.explain evaporation ?

Answered: 1 week ago

Question

Who was the first woman prime minister of india?

Answered: 1 week ago