Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean msgGot=false;
- char confChar=7;
- void setup()
- {
- Serial.begin(38400);
- }
- void loop()
- {
- establishConnection();
- }
- void establishConnection()
- {
- delay(345);
- while(msgGot==false)
- {
- Serial.println(confChar);
- }
- for(Serial.available()<=0; msgGot=false;)
- {
- if(Serial.read()==confChar)
- {
- msgGot=true;
- Serial.println("Connection established!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement