Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String comando;
- void setup (){
- Serial.begin(9600);
- }
- void loop(){
- if(Serial.available()) {
- while (Serial.available()>0){
- char serial = Serial.read();
- comando += serial; // monta a string com cada caracter escrito na serial
- delay(10);
- }
- }
- if(comando == "55441")
- {
- Serial.println("Recebeu 55441");
- }
- comando = ""; // limpa a string
- delay(100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement