Title of Media
Same Idea of week 7 about changing light from cold to warm ,but I want to add wireless step to it , you can change warm or cold as you prefer from your mobile, to be suitable to your activities like " read , sleep , work ". If there are two partner in one place , every one of them can change the light type as he like.
Software: Arduino IDE
Title of Media
3 resistor 220 ohm
Arduino uno
Breadboard
Buzzer
Jumper Wires (Male - Male) (male -female)
Bluetooth module
Title of Media
The link of circuit on tinker cad :
when I write the code , I want to light the led with red colour when I press 1 on Arduino Bluetooth control app , the led to be green colour when I press 2 on Arduino Bluetooth control app , the led to be green colour when I press 3 on Arduino Bluetooth control app , the buzzer make noise when I press 4 on Arduino Bluetooth control app .
the code :
int LEDR = 2;
int LEDG = 4;
int LEDB = 3;
int Buzzer = 7;
char incomingData = '0';
void setup()
{
Serial.begin (9600);
pinMode (LEDR, OUTPUT);
pinMode (LEDG, OUTPUT);
pinMode (LEDB, OUTPUT);
pinMode (Buzzer, OUTPUT);
}
void loop()
{
while (Serial.available() == 0);
incomingData = Serial.read();
if (incomingData == '1') {
digitalWrite (LEDR, HIGH);
digitalWrite (LEDG, LOW);
digitalWrite (LEDB, LOW);
digitalWrite (Buzzer, LOW);
} else if (incomingData == '2') {
digitalWrite (LEDR, LOW);
digitalWrite (LEDG, HIGH);
digitalWrite (LEDB, LOW);
digitalWrite (Buzzer, LOW);
} else if (incomingData == '3') {
digitalWrite (LEDR, LOW);
digitalWrite (LEDG, LOW);
digitalWrite (LEDB, HIGH);
digitalWrite (Buzzer, LOW);
} else if (incomingData == '4') {
digitalWrite (LEDR, HIGH);
digitalWrite (LEDG, HIGH);
digitalWrite (LEDB, HIGH);
digitalWrite (Buzzer, LOW);
} else {
digitalWrite (LEDR, LOW);
digitalWrite (LEDG, LOW);
digitalWrite (LEDB, LOW);
digitalWrite (Buzzer, HIGH);
}
}
circuit in Real
Every time uploading the code to the Arduino , it is not uploaded and this message appear , I change the code a lot of time but it is the same , I asked Amani , she advised me to check Arduino if it is nano or uno , then advised me to get the jumper from pin 0 ,1 while uploading , I did that and the code uploaded successfully .
Title of Media
Title of Media
My final project ,I will use the idea of changing the colour of RGB led , also the buzzer will work in the end , so I want to try the circuit but with mobile , get familiar with the code .
The Makeathon of week 8 , and playing with other teams fishing and having fun too , It was really cool
Did you ask for feedback? What are the ideas that others have contributed or suggested? What was someone else’s idea that you built upon? How did you help your peers? How did your peers help you?
The Makeathon of week 8 , Nariman was a good team player helped our team in writing the code , she is very helpful and smart .