유은제gledel
Published

Bluetooth-Serial Monitor-Smartphone Chat/LED(hw)

Chat with your computer by using your smart phone. You can also turn on and off the LED with your phone!

BeginnerProtip674
Bluetooth-Serial Monitor-Smartphone Chat/LED(hw)

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Breadboard (generic)
Breadboard (generic)
×1
Bluetooth Low Energy (BLE) Module (Generic)
×1
LED (generic)
LED (generic)
×1
Resistor 221 ohm
Resistor 221 ohm
×1
Jumper wires (generic)
Jumper wires (generic)
×8

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Schemetics of bluetooth (HW, Chat)

Schemetics of bluetooth (HW, LED)

Code

code of hardware connection (Chat, terminal mode)

EJS
When you upload the code disconnect 0 and 1 with the arduino. After finishing the uploading, reconnect them.
 void setup(){
   Serial.begin(9600);
 }
 
 void loop (){
  if(Serial.available()){
    char a = Serial.read();
    Serial.println(a);
  }
  
  } 

code of hardware connection (LED, switch mode)

EJS
When you upload the code disconnect 0 and 1 with the arduino. After finishing the uploading, reconnect them.
int led = 8;
char command;
 
void setup() {
  Serial.begin(9600);
}
 
void loop() {
  if(Serial.available()){
  char command = Serial.read();
  Serial.println(char(command));
  if (command == 'Y'|| command == 'y'){
    digitalWrite(led, HIGH);
  }
  else if (command == 'N' || command == 'n'){
    digitalWrite(led, LOW);
  }
}
}

Credits

유은제
15 projects • 13 followers
Hello :-) I'm a high school student in South Korea.
gledel
100 projects • 116 followers
Looking back on my childhood, I was happy when I was making something and I was proud of myself. "Making is instinct!"

Comments