Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MMA8451Q mbed nRF24L01P
Fork of Acclerometer_node by
Revision 9:934cae7f3290, committed 2015-08-10
- Comitter:
- jaehughes
- Date:
- Mon Aug 10 16:11:23 2015 +0000
- Parent:
- 8:412307ba78b0
- Child:
- 10:149ded218037
- Commit message:
- zigbee
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Aug 08 12:41:56 2015 +0000
+++ b/main.cpp Mon Aug 10 16:11:23 2015 +0000
@@ -4,7 +4,7 @@
Serial pc (USBTX, USBRX);
Serial xbee (PTE0, PTE1);
-const int ARRAY_LENGTH = 500;
+const int ARRAY_LENGTH = 50;
float temperature_celsius, temperature_voltage, light_voltage, raw_pir_reading, noise_voltage, noise_maximum, noise_average, noise_total, noise_variance, noise_sd, presence_percentage, num_consecutive_runs;
char publishString[40];
float noise_array[ARRAY_LENGTH];
@@ -31,6 +31,8 @@
sprintf(publishString,"%.1f, %.1f, %.1f, %.1f, %.1f", temperature_celsius, light_voltage, noise_maximum, noise_average, noise_variance);
xbee.printf(publishString);
+ pc.printf("publish");
+ pc.printf(publishString);
//Spark.publish("measurements", publishString);
sprintf(publishString, "%.1f, %.1f", presence_percentage, num_consecutive_runs);
xbee.printf(publishString);
