Skip to content

pyroalf/kaa-cassandra-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, DHT 11 sensor and 3 Male-Male jumper wires.

  2. Install third-party components for C SDK using this steps.

  3. [Raspberry Pi] Install the WiringPi 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 log schema and put it to the kaa-cassandra-sample/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 7. [Raspberry Pi] Build the client demo based on the Kaa C SDK.

cd kaa-cassandra-sample/client/c
./build.sh deploy
  1. [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 }
    

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published