Raspberry Pi & Accelerometer with Losant’s EEA

This is a repository that contains companion code to this EEA How To guide.

Losant Dashboard showing FFT data

Each folder is named according to a step in the guide and contains completed code for the guide.

Step 2 is a simple example that simply ensures that the accelerometer is connected correctly and the Raspberry Pi is set up correctly.

Step 3 introduces the Losant EEA without any registered functions to make sure that your device can connect to the Losant Platform.

Step 4 introduces a simple registered function that reads the accelerometer once every 10 seconds and sends the X-axis value back to the cloud.

Step 6 changes the registered function for reading the accelerometer from 1 value to reading 1024 readings, measuring sample rate, and reporting both values to the cloud.

To Use

  1. Clone this repository to your Raspberry Pi.
  2. Follow Step 1 in the How To guide to set up your Raspberry Pi.
  3. Create an Embedded Device and in your Losant Application.
  4. Each step folder has a readme which includes instructions on how to run the main.py file.

For any questions, please visit the Losant Forums.

GitHub

View Github