How-to: Receive Acceleration SnippetsΒΆ
This example outlines the steps to connects to an ANURA vibration sensor and configures it to send acceleration waveform data in the form of snippets.
Scan for the Device: Scan to find the sensor node, which will be advertising the AVSS UUID.
Connect and Subscribe: Connect to the sensor and set up subscriptions to the Control Point and Report characteristics.
Retrieve Firmware Info: Execute the
Get Firmware Infocommand and note the response. Although not mandatory, displaying this information can be useful for troubleshooting.Configure Settings: Execute the
Write Settingscommand and await the response. The sensor will ignore any unknown or malformed parameters, and the response will indicate the number of ignored parameters.Apply Settings: Execute the
Apply Settingscommand and await the response. If the sensor needs to reboot, thewill_rebootparameter will be set. The client should handle this by reconnecting.Subscribe to Snippet Reports: Execute the
Report Snippetscommand to subscribe to snippet reports.Trigger Measurements: Send a
Trigger Measurementcommand to initiate measurements, even if the sensor is stationary. To extend the measurement period beyond the maximum of 60 seconds, issue repeatedTrigger Measurementcommands. These can be sent before the previous measurement period has ended.