Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pyroalf/kaa-cassandra-sample
https://github.com/pyroalf/kaa-cassandra-sample
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pyroalf/kaa-cassandra-sample
- Owner: pyroalf
- License: apache-2.0
- Created: 2015-11-17T06:16:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-10T17:52:04.000Z (over 9 years ago)
- Last Synced: 2024-08-02T06:16:46.535Z (6 months ago)
- Language: C
- Size: 2.11 MB
- Stars: 0
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Kaa application based on Raspberry Pi and DHT11 sensor
============================
This sample RaspberryPI application collects temperature measurements from DHT11 sensor and uploads it to Cassandra using Kaa.Kaa is an open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything.
Installation instruction
1. Get [Rasberry Pi 2 Model B](https://en.wikipedia.org/wiki/Raspberry_Pi), [DHT 11 sensor](http://www.dx.com/p/arduino-digital-temperature-humidity-sensor-module-121350#.Vea7HHWlxBc) and 3 Male-Male jumper wires.
2. Install third-party components for C SDK using this [steps](http://docs.kaaproject.org/display/KAA/Raspberry+Pi#RaspberryPi-Installingthird-partycomponentsforCSDK).
3. [Raspberry Pi] Install the [WiringPi](http://wiringpi.com/) library.```
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
```
4. [Raspberry Pi] Clone the repository of the Kaa Cassandra sample.```
git clone https://github.com/kaaproject/kaa-cassandra-sample.git
```
5. [Raspberry Pi] Generate the Kaa C SDK based on [this](https://github.com/kaaproject/kaa-cassandra-sample/blob/master/client/resources/logSchema.json) log schema and put it to the [kaa-cassandra-sample/client/c/libs/kaa](https://github.com/kaaproject/kaa-cassandra-sample/tree/master/client/c/libs/kaa) directory.6. Connect wires using following schema.
- Connect DHT11 pin 1 (left) to Raspberry PI pin 7 (GPIO 4)
- Connect DHT11 pin 2 (middle) to Raspberry PI pin 1 (VCC)
- Connect DHT11 pin 3 (right) to Raspberry PI pin 14 (GND)
![DHT11](https://github.com/kaaproject/kaa-cassandra-sample/blob/master/schema.jpg)
7. [Raspberry Pi] Build the client demo based on the Kaa C SDK.```
cd kaa-cassandra-sample/client/c
./build.sh deploy
```
8. [Raspberry Pi] Observe console output.```
Data collection demo started
Going to add 1th log record: { id: 'Sensor 1', region: 'Region 1', model: 'DHT11', val: 25 }
Going to add 2th log record: { id: 'Sensor 1', region: 'Region 1', model: 'DHT11', val: 25 }
Going to add 3th log record: { id: 'Sensor 1', region: 'Region 1', model: 'DHT11', val: 25 }
Going to add 4th log record: { id: 'Sensor 1', region: 'Region 1', model: 'DHT11', val: 25 }
Going to add 5th log record: { id: 'Sensor 1', region: 'Region 1', model: 'DHT11', val: 25 }
```