Counting door opening via Tessel module Accelerometer and saving data to SynergyKit.
What you will need:
- SynergyKit account and free application
- Tessel platform
- Accelerometer module
SynergyKit is Backend as a Service for building REST & real–time APIs.
Detect orientation and movement of your Tessel by measuring gravity / acceleration.
- 3-Axis Digital Accelerometer
- 12-bit resolution Selectable
- ±2g/±4g/±8g scales
Clone this repository
git clone email@example.com:SynergyKit/Tessel-Door.git
Change directory into that folder
Plug the accelerometer module into Tessel port A with the hexagon/icon side down and the electrical components on the top, then plug Tessel into your computer via USB.
Install accelerometer library by typing
npm install accel-mma84
and SynergyKit Node.js SDK by typing
npm install synergykit
Create your SynergyKit account here. Than create new application and grab your tenant with application key. Both insert in this line of code in door.js file
Synergykit.Init("YOUR_TENANT", "YOUR_KEY") // Initialization of SynergyKit
Push your code to Tessel platform by typing
tessel push door.js
Unplug your tessel from computer and plug it to another source of energy, for example power bank.
Attach whole device on the door.