Update sensor_extension.c add sensor_buffer and sensor count

sim-fail-6
Alan Johnston 4 months ago committed by GitHub
parent f76082be54
commit 980b310b64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -16,13 +16,17 @@ void sensor_setup() {
// put your loop code here // put your loop code here
// Very Important: only use print, not println!! // Very Important: only use print, not println!!
void sensor_loop() { int sensor_loop(char *sensor_buffer) {
printf("Reading new sensor!"); int sensors = 3; // set to the number of sensor readings adding.
sensor_buffer[0] = 0; // make sure buffer is empty
printf("Reading new sensors!\n");
strcpy(sensor_buffer, "NEW 0.0 0.0 0.0");
printf("New sensor string: %s\n", sensor_buffer);
/* return(sensors);
printf(" NEW 0.0"); // send sensor data over serial to Pi Zero
printf(" NEW 0.0"); // send sensor data over serial monitor for testing
*/
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.