communicate() in the SODA Library
The communicate method in the SODA library is handy for checking on the status of the datalogger, downloading data, and resetting the time. If you want to be able to communicate with the SODA via a USB cable, then place a call to the communicate method as the first line of the loop() block. Here's a clip from the simple datalogging example:
void loop(){
soda.communicate();
When you connect the SODA to a computer or tablet via a USB cable it will power on. When it reaches the call to the communicate method it will stop and wait for input. The HE 1.0 board sensing when USB is connected using digital pin 0 (it's best to avoid this pin when connecting other sensors).
You can issue communication commands in the serial monitor. Commands are single letters enclosed in block parentheses such as [t]. You can also pass additional information within the parentheses such as resetting the time on the real-time clock using YYYY-MM-DD HH:MM:SS. For example: [T1974-07-28 HH:MM:SS]
The command is echoed back and the returned information is also enclosed in block parentheses. This isn't the easiest human-readable format but it's setup to make communication easier to parse with an upcoming Android app. Here's a serial session where the different commands are shown:
void loop(){
soda.communicate();
When you connect the SODA to a computer or tablet via a USB cable it will power on. When it reaches the call to the communicate method it will stop and wait for input. The HE 1.0 board sensing when USB is connected using digital pin 0 (it's best to avoid this pin when connecting other sensors).
You can issue communication commands in the serial monitor. Commands are single letters enclosed in block parentheses such as [t]. You can also pass additional information within the parentheses such as resetting the time on the real-time clock using YYYY-MM-DD HH:MM:SS. For example: [T1974-07-28 HH:MM:SS]
The command is echoed back and the returned information is also enclosed in block parentheses. This isn't the easiest human-readable format but it's setup to make communication easier to parse with an upcoming Android app. Here's a serial session where the different commands are shown: