Monday, June 26, 2017

Day 11: A day of troubleshooting

I spent today troubleshooting the BottleLogger v2. I started with running the Trujillo demonstration code that I thought worked, confirming that it worked, even without any delays. After an hour of running, there were no errors on the SD card, and all of the data logged like expected.

While the Trujillo demonstration ran, I looked at and modified the sinewave program that we really need. I viewed more example code from Northern Widget's website, and so that they use goToSleep_if_needed() rather than sleep(), so I slotted that into my program. Their example programs also sandwiched sensor readings between logger.startAnalog() and logger.endAnalog(), so I rearranged some lines of code, and made sure to read pressures and temperature between those two lines of code. Other than adjusting scalars and constants for today's water temperature and air pressure, those were the only significant changes I made.

Once I ran the modified sinewave program, immediately the outlet started to make clicking sounds, and it did not work. Removing logger.endAnalog() (while keeping logger.startAnalog()) fixed this issue. I'm not sure what effect that has on the BottleLogger v2, but I will look into it. For now, it's staying out, because it's clearly breaking the program.

After 15 minutes of running sinewave_testing (with an additional 2 second delay between iterations), there were no issues, the SD card remained error free, and all of the data logged like expected. So I removed the 2 second delay and let it run for another 30 minutes, ending with the same results. A fairly positive result. Unfortunately, looking at the time stamps on the data collected, goToSleep_if_needed() adds a 3 seconds delay between iterations in the program.

Tomorrow's tasks are:
* Look at what goToSleep_if_needed() does, and try to cut down the delay.
* Install and test the Arduino software on more computers.

I'm sure more tasks will come up, should I complete those quickly.

1 comment: