In the repository I've added a few extra files for anyone wanting to try sharing their data using Xively. If you'd like to try this out then you'll need to register - it's free - and create a new 'device'. I've called mine 'Wearable Pi' which give a hint as to what I'm hoping to do with it. Once you've created the device entry on Xively you'll need to create the following channels -
t006, accl_x, accl_y, accl_z, humd_t, humd_rh, baro_t, baro_p, magn_x, magn_y, magn_z, gyro_x, gyro_y, gyro_z
As the code is at present it will collect 10 measurement from each sensor at the default rate of one per second and then upload to Xively. I did try uploading every second, but the Xively API only allowed this for burst of a few seconds. There's obviously an opportunity here for some clever optimisation - upload at a high rate when the data is changing rapidly (shake the SensorTag) and at a lower rate when readings are stable. It will depend on your intended application.
As before I'm happy to take corrections and questions in the comments. It would also be nice to know what others are doing with their SensorTag Raspberry Pi combo - so please share.
I'll be taking mine along to the 3rd International Space Apps Challenge on 12/13 April 2014 and maybe hacking some prototype space wearable tech.
I was using this to check some Java code we wrote to do the temperature calculations. Am I misunderstanding the floatfromhex function?
sensortag_test.py is converting '2c', 'ff' to -211. I come up with $ff21 -> -212.
t = -(float.fromhex('ffff') - t)
t = -(float.fromhex('10000') - t)
It's only .05 C or so, but I want to be sure I understand what the code is doing!
Thanks for the info. Curious on how long the battery life lasts.
hi. thanks for the info. I'm curious on how long the battery life lasts.
Post a Comment