Hardware Reference
In-Depth Information
// Restart the date process:
if ( ! date.running()) {
date.begin( "date" );
date.addParameter( "+%D-%T" );
date.run();
}
// Get date
String timeString = date.readString();
// Format data
String data = "" ;
data = data + timeString + "," +
String(humidity) + "," +
String(lightLevel) + "," +
String(pressure) + "," +
String(temperature) + "," +
String(altitude);
// Set Choreo inputs
AppendRowChoreo.addInput( "RowData" , data);
// Run the Choreo
unsigned int returnCode = AppendRowChoreo.run();
// A return code of zero means everything worked
if (returnCode == 0 ) {
if (debug_mode == true ){
Serial.println( "Completed execution of the AppendRow Choreo. \n " );
}
} else {
// A non-zero return code means there was an error
// Read and print the error message
while (AppendRowChoreo.available()) {
char c = AppendRowChoreo.read();
if (debug_mode == true ){ Serial.print(c); }
}
if (debug_mode == true ){ Serial.println(); }
}
AppendRowChoreo.close();
}
Let's now see the details of the code. You need to import all the libraries for the Arduino
Yun web & bridge functionalities:
Search WWH ::




Custom Search