Home › Forums › Mayfly Data Logger › XBee Networks of Mayfly Loggers – 900Mhz › Reply To: XBee Networks of Mayfly Loggers – 900Mhz
2023-06-01 at 12:55 PM
#17861
Okay, so this is what I have now for my sender code:
1 2 3 4 5 6 7 |
#include <Wire.h> #include "Sodaq_DS3231.h" void setup() { pinMode(18, OUTPUT); digitalWrite(18, |
Okay, so this is what I have now for my sender code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#include <Wire.h> #include "Sodaq_DS3231.h" void setup() { pinMode(18, OUTPUT); digitalWrite(18, HIGH); Serial1.begin(9600); Wire.begin(); rtc.begin(); delay(3000); } void loop() { digitalWrite(8, HIGH); rtc.convertTemperature(); Serial1.print(rtc.getTemperature()); Serial1.println(" deg C"); delay(1000); digitalWrite(8, LOW); delay(1000); } |
And this is what I have for my receiver code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#include <Wire.h> void setup() { pinMode(18, OUTPUT); digitalWrite(18, HIGH); Serial.begin(57600); Serial1.begin(9600); delay(100); delay(3000); } void loop() { Serial.println(Serial1.read()); delay(3000); } |
I am still getting a -1 value printed to my serial port. If everything looks right on the coding side of it, then maybe I just need to double-check/reconfigure the modules in XCTU.