Tessel Door
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
- Door
SynergyKit
SynergyKit is Backend as a Service for building REST & real–time APIs.
Accelerometer
Detect orientation and movement of your Tessel by measuring gravity / acceleration.
- 3-Axis Digital Accelerometer
- 12-bit resolution Selectable
- ±2g/±4g/±8g scales
Step 1
Clone this repository
git clone git@github.com:SynergyKit/Tessel-Door.git
Change directory into that folder
cd Tessel-Door
Step 2
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.
Step 3
Install accelerometer library by typing
npm install accel-mma84
and SynergyKit Node.js SDK by typing
npm install synergykit
Step 4
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
Step 5
Push your code to Tessel platform by typing
tessel push door.js
Step 6
Unplug your tessel from computer and plug it to another source of energy, for example power bank.
Step 7
Attach whole device on the door.
Bonus
You can create simple client JavaScript with JavaScript SDK to watch door opening real-time.
Comments