ttu / ruuvitag-sensor

Python package for communicating with RuuviTag BLE Sensor and for decoding sensor data from broadcasted data
https://ttu.github.io/ruuvitag-sensor/
MIT License
195 stars 77 forks source link

acceleration, how can I get it? #47

Closed ghost closed 6 years ago

ghost commented 6 years ago

Possible with the package, I can get the acceleration value?

ttu commented 6 years ago

Depends on RuuviTags firmware and which mode is activated (RAW mode sends also acceleration data).

https://github.com/ttu/ruuvitag-sensor#data-formats

https://lab.ruuvi.com/ruuvitag-fw/

ghost commented 6 years ago

Cool, currently I am using one of your example link https://github.com/ttu/ruuvitag-sensor/blob/master/examples/print_to_screen.py where it only return as above but not acceleration, show I define the data formats?

ttu commented 6 years ago

Press Button B from your RuuviTag and red light should start blinking dimly. It means that RAW mode is activated and then it will broadcast data in format 3 or 5 depending on the firmware. (https://lab.ruuvi.com/ruuvitag-fw/)

Then returned data dictionary will have data['acceleration']. If you want that example will also print it, you need to add that line manually.

ghost commented 6 years ago

Excellent.