Demo starter application to connect WiGo to NSP and expose on-board sensors
Dependencies: NVIC_set_all_priorities cc3000_hostdriver_mbedsocket mbed nsdl_lib TEMT6200 TSI Wi-Go_eCompass_Lib_V3 WiGo_BattCharger
This is the mbed project for the IoT World Hackathon event, June 17th and 18th in Palo Also.
The setup instructions for participants are at the Setup page of this wiki:
Revision 17:b4cdafc4241d, committed 2014-06-18
- Comitter:
- sam_grove
- Date:
- Wed Jun 18 16:20:06 2014 +0000
- Parent:
- 16:d6812604cf92
- Child:
- 18:11b9d98ecae2
- Commit message:
- Added compass heading endpoint back in
Changed in this revision
| nsdl_run.cpp | Show annotated file Show diff for this revision Revisions of this file |
| resources/magnetometer.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/nsdl_run.cpp Wed Jun 18 03:29:01 2014 +0000
+++ b/nsdl_run.cpp Wed Jun 18 16:20:06 2014 +0000
@@ -116,7 +116,7 @@
create_alt_resource(resource_ptr);
create_slider_resource(resource_ptr);
create_accel_resource(resource_ptr);
-// create_magnet_resource(resource_ptr);
+ create_magnet_resource(resource_ptr);
create_rgbled_resource(resource_ptr);
/* Register with NSP */
--- a/resources/magnetometer.cpp Wed Jun 18 03:29:01 2014 +0000
+++ b/resources/magnetometer.cpp Wed Jun 18 16:20:06 2014 +0000
@@ -104,9 +104,9 @@
int create_magnet_resource(sn_nsdl_resource_info_s *resource_ptr)
{
- nsdl_create_dynamic_resource(resource_ptr, sizeof(MAGNET_X_RES_ID)-1, (uint8_t*)MAGNET_X_RES_ID, 0, 0, 0, &magnet_x_resource_cb, (SN_GRS_GET_ALLOWED));
- nsdl_create_dynamic_resource(resource_ptr, sizeof(MAGNET_Y_RES_ID)-1, (uint8_t*)MAGNET_Y_RES_ID, 0, 0, 0, &magnet_y_resource_cb, (SN_GRS_GET_ALLOWED));
- nsdl_create_dynamic_resource(resource_ptr, sizeof(MAGNET_Z_RES_ID)-1, (uint8_t*)MAGNET_Z_RES_ID, 0, 0, 0, &magnet_z_resource_cb, (SN_GRS_GET_ALLOWED));
+// nsdl_create_dynamic_resource(resource_ptr, sizeof(MAGNET_X_RES_ID)-1, (uint8_t*)MAGNET_X_RES_ID, 0, 0, 0, &magnet_x_resource_cb, (SN_GRS_GET_ALLOWED));
+// nsdl_create_dynamic_resource(resource_ptr, sizeof(MAGNET_Y_RES_ID)-1, (uint8_t*)MAGNET_Y_RES_ID, 0, 0, 0, &magnet_y_resource_cb, (SN_GRS_GET_ALLOWED));
+// nsdl_create_dynamic_resource(resource_ptr, sizeof(MAGNET_Z_RES_ID)-1, (uint8_t*)MAGNET_Z_RES_ID, 0, 0, 0, &magnet_z_resource_cb, (SN_GRS_GET_ALLOWED));
nsdl_create_dynamic_resource(resource_ptr, sizeof(COMPASS_RES_ID)-1, (uint8_t*)COMPASS_RES_ID, 0, 0, 0, &compass_resource_cb, (SN_GRS_GET_ALLOWED));
return 0;
}
\ No newline at end of file