daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Mar 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <SoftwareSerial.h>
  2.  
  3. SoftwareSerial mySerial(0, 1); // RX, TX
  4.  
  5. const int waterLevel = A0;
  6. int waterValue;
  7. int mq2_analogPin = A1;
  8.  
  9. void setup()
  10. {
  11.   Serial.begin(9600);
  12.   while(!Serial){
  13.     ;
  14.   }
  15.   Serial.println("Serial Online");
  16.  
  17.   mySerial.begin(9600);
  18.   while(mySerial){
  19.     ;
  20.   }
  21.   delay(1000);
  22.   mySerial.println("Hello !");
  23.   Serial.println("Bluetooth online");
  24.  
  25. }
  26.  
  27. void loop()
  28. {
  29.  String bluetoothData;
  30.  mySerial.listen();
  31.  while(mySerial.available()) {
  32.     mySerial.println("Je mesure...");
  33.  }
  34.  
  35.  
  36.  
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top