Sensors: Accelerometer & Temperature
Last updated
Last updated
FreeWil-i includes an accelerometer part number LIS3DH from ST microelectronics. The Accel sensor data is viewable from the serial menu (below) and is usable from the API. The mounting is such that the Z direction points up from the screen and the X axis points towards the IO Connector.
The sensors app Accel and Temperature will display accelerometer in a graphical form on the FreeWili screen. The top line shows the the current range, x, y ,z and temperature. If the axis broke the move threshold it will be temporarily white text. Below is a plot of the sensor. The LED will indicate x, y, z in both led position and color. This is usable anytime as a light show.
The sensor settings contain the settings for the accelerometer. This includes a range and a move threshold. The ranges supported by the Accel include 2, 4, 8, and 16. The move threshold is how much a Accel axis must change indicate Free Wili is moving. The moving signal can awake the screen or create events for your custom wasm scripts.
The temperature calibration allow you to tweak the default scaling of the rp chips internal temperature sensor. The calibration applies a floating point scale and offset to the default temperature scaling.
The setSensorSettings API call will enabled the sensors to be reported at a specific rate through a GUI event. Also, it can also add the sensor value to an indicated plot data store. The event FWGUI_EVENT_GUI_SENSOR_DATA will report sensor data. The Accel and sensors can also be logged to a text log with the API setAppLogSettings below.