Home › Forums › Monitor My Watershed › Editing Variable UUIDs › Reply To: Editing Variable UUIDs
2020-03-17 at 11:15 AM
#13945
In line 239/240 you’re missing the opening brace of the setup function. It should be void setup() {
with that opening curly brace. You can put the curly brace right after the parenthesis on line 239 or by itself on line 240.
Missing braces and semi-colons are such a pain. The error messages they usually cause don’t help much.
Also, your code is missing the “loop()” function – it will set everything up and then do nothing. You probably want to add this loop (just paste it at the end of your current code):
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
// ========================================================================== // Main loop function // ========================================================================== // Use this short loop for simple data logging and sending void loop() { // Note: Please change these battery voltages to match your battery // At very low battery, just go back to sleep if (getBatteryVoltage() < 3.4) { dataLogger.systemSleep(); } // At moderate voltage, log data but don't send it over the modem else if (getBatteryVoltage() < 3.55) { dataLogger.logData(); } // If the battery is good, send the data to the world else { dataLogger.logDataAndPublish(); } } |