Home › Forums › Other Data Loggers › Arduino datalogger › Reply To: Arduino datalogger
Past your code into this thread and I’ll take a look at it. Also, did you change the baud rate of the Xbee modules using X-CTU, or are they still set to the default?
Also, if you’re ever having trouble with a new sketch because you’re testing several new sections together for the first time, try removing some of them to simplify it and make sure each small block works separately before trying all of them together.
For example, remove all the SDI-12 stuff and the Xbee and the software serial and just make sure you can successfully get the FIO to say “Hello World” on the serial monitor port at 9600. Then use that same sketch but unplug the USB cable and put the Xbee module on the FIO. Use a separate battery (so you don’t get conflicts from the USB port) and verify that you see “Hello World” on your other Xbee coordinator receiver monitor. If you’re able to do that, then go back to the sketch and add the software serial on 2 unused pins and monitor that with your PC serial monitor. Verify that you see the same thing on the PC that you see on your Xbee coordinator. If all of that works, then you can add back the code for the SDI12 sensor.
Another thing to note is that you’re probably going to get an error when compiling the code if you’re using SoftwareSerial and SDI12 at the same time due to port interrupt conflicts. That’s why I created the SDI12_Mod and SoftwareSerialMod libraries that are found in our Github repo so that you can use those 2 libraries together without conflicts.