-
Tue 2020.01.28
'not yet sure how to weave it all together'
'I'd like to get readings from the magnetometer (open/close door), temp and light sensor'So @user108908, is it possible that what is being attempted has started with a bit of overkill with a not so suitable starter example?
. . . or . . . is the task at hand a question for where to decode the sensor data, rather than/or how to interface with MQTT and EspruinoHUB?
I grabbed this easier to follow example Puck Detecting Movement from the 'Tips and Tricks' page:
Obtaining the current battery level:
"You can use Puck.mag() to return one magnetometer reading (with x, y, and z axes)" code snippet from:
As the Tutorials section is directed at providing a solution map for others to follow to reach the same proven presentation, see beneath heading in the specific 'Tutorials' posting pane on the right hand side,"Post any tutorials/examples for Espruino here!" that a better thread section might provide better visibility for what is desired here?
For: @Gordon This post most likely would benefit user108908 if it were posted under:
Home >> Official Espruino Boards >> Puck.js or Interfacing, perhaps?Also, where did the basic Getting Started video (~4-6min) Intro to Espruino link that showed a broad overview from typing code into the WebIDE and simple interface snippets get to? I used to (> ~6mo ago) fetch that from the main menu. If it is there, now not as intuative location as before.
Thanks - yes, I've poked around in there... not yet sure how to weave it all together and suspect the code is out there somewhere.
Forgot to mention I have gotten EspurinoHub installed, which appears to aggregate some of the advertising and post results to MQTT.
I'd like to get readings from the magnetometer (open/close door), temp and light sensor, as well as battery level.