It is a module that expose data read from an MPU6050 sensor (acceleration + gyroscope) using a Raspberry Pi board.
PRs are welcome.
- Raspberry Pi board
- MPU6050 module
- Node.js >= 10 (LTS)
This module requires a proper setup of a Raspberry Pi board. A detailed walkthrough on how to prepare the Raspberry Pi setup can be found here.
- Clone the repository in a directory
[directory]
cd [directory]
npm install
npm link
read-mpu --help
- If you want to connect to AWS generate and install the certificates as described here
- Enjoy.
- Go to repo directory
npm unlink
- Remove the repo directory
The package includes a full test coverage. Go inside the repo directory and run:
npm test
Once executed you can find the coverage report in a neat html format:
cd coverage
- open with a browser the file
index.html
The module can:
- be installed as a component in another node program
- be used from the CLI by invoking
read-mpu
with the proper options. Typeread-mpu --help
for a complete list of available commands
The code is fully commented. All the functions and helpers are documented using JSHint conventions. That will trigger autocompletion and code hints in code editors like Visual Studio Code.