Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SoftwareSerial.h>
- SoftwareSerial mySerial(0, 1); // RX, TX
- const int waterLevel = A0;
- int waterValue;
- int mq2_analogPin = A1;
- void setup()
- {
- Serial.begin(9600);
- while(!Serial){
- ;
- }
- Serial.println("Serial Online");
- mySerial.begin(9600);
- while(mySerial){
- ;
- }
- delay(1000);
- mySerial.println("Hello !");
- Serial.println("Bluetooth online");
- }
- void loop()
- {
- String bluetoothData;
- mySerial.listen();
- while(mySerial.available()) {
- mySerial.println("Je mesure...");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement