Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------- NodeMCU Code -----------//
- #include<SoftwareSerial.h>
- SoftwareSerial ss(5, 6); // RX, TX
- float myData = 123.45;
- void setup() {
- ss.begin(9600);
- }
- void loop() {
- ss.println(myData);
- delay(500);
- }
- //----------- Arduino Code -----------//
- float myData;
- void setup() {
- Serial.begin(9600);
- }
- void loop() {
- if (Serial.available()) {
- myData = Serial.parseFloat();
- Serial.print("Sensor Value: ");
- Serial.println(myData);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement