Search
 
SCRIPT & CODE EXAMPLE
 

CPP

arduino bleutooth module hc-05 with led

char Incoming_value = 0;
void setup() {
  
Serial.begin(9600); //the bluetooth standard port of the hc-05
pinMode(13,OUTPUT);
}

void loop() {
  if (Serial.available() > 0)  
    {
      Incoming_value = Serial.read();
      Serial.print(Incoming_value);
      Serial.print("/n");
      if (Incoming_value == '1') //if you send 0 to the HC-05, LED will be off
        digitalWrite(13,HIGH);
      else if(Incoming_value == '0')//if you send 0 to the HC-05, LED wil be on
        digitalWrite(13,LOW);
    }
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: curl upload folder and subfolders 
Cpp :: check if a string is a prefix of another c++ 
Cpp :: use ster when declaring variables cpp 
Cpp :: idnefier endl in undefince 
Cpp :: warning: base will be initialized after 
Cpp :: c++ error missing terminating character 
Cpp :: Corong_ExerciseNo3 
Cpp :: copy file to vector c++ 
Cpp :: How to remove the % in zsh that show after running c++ file 
Cpp :: print all substrings in c++ 
Cpp :: texorpdfstring math in title latex 
Cpp :: sort an array using stl 
Cpp :: class how to call main method inheritance in c++ 
Cpp :: reading matrix from text file in c++ and adding them and then storing them in oother c++ file 
Cpp :: I/O Redirection in C++ 
Cpp :: remove digit from number c++ 
Cpp :: c++ reverse bits 
Cpp :: c++ to mips assembly converter 
Cpp :: 1822. Sign of the Product of an Array leetcode 
Cpp :: c++ 2 dim array initialize 
Cpp :: C++ Single Line Comments 
Cpp :: flowchart to display factors of a number 
Cpp :: check if a variable is tring c++ 
Cpp :: how to get a section of a string in c++ 
Cpp :: how to merge string array in C++ 
Cpp :: result += a +b in c++ meaning 
Cpp :: declare static table filled cpp 
Cpp :: pass address to function c++ 
Cpp :: void linux java 
Cpp :: how to list directory in c++ 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =