Hackster will be offline on Monday, June 15 from 5pm to 7pm PDT to perform some scheduled maintenance.
Mahamudul Karim Khondaker
Published

Arduino to Smartphone Communication

Control Arduino from your smartphone or laptop using Bluetooth.

IntermediateFull instructions provided7,009
Arduino to Smartphone Communication

Things used in this project

Schematics

hc-05-led_blink_circuit_fFGIeKDvJ2.png

Code

Untitled file

C/C++
int led = 13;
void setup(){
  Serial.begin(9600);
  pinMode(led,OUTPUT);
  digitalWrite(led,LOW);
}
void loop(){
 if(Serial.available()){
   String value = Serial.readStringUntil('\n');
   Serial.println(value);
   if(value == "on"){
     digitalWrite(led,HIGH);
   }
   else if(value == "off"){
     digitalWrite(led,LOW);
   }}}

Credits

Mahamudul Karim Khondaker
43 projects • 132 followers
Completed BSc at Electrical & Electronic Engineering (EEE) From United International University. Dhaka, Bangladesh

Comments