GithubHelp home page GithubHelp logo

sumansouravsg / raspberrypi-to-azure-iot-hub Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yoshioterada/raspberrypi-to-azure-iot-hub

0.0 0.0 0.0 64 KB

This is the sample Java application of Raspberry Pi (with BME 280). It send the sensor data of Celsius, Pressure and Humidity to Azure IoT Hub.

Java 100.00%

raspberrypi-to-azure-iot-hub's Introduction

Intrusion detection Java App on RaspberryPi with Microsoft Azure

Confirmation of this demo

This Sample Appliaction get the data of celsius, pressure and humidity data from BME 280 sensor on Raspberry Pi(Raspberry Pi 2 Model B). After receved it, the application push the data to Azure IoT Hub.I also configure the Stream Analytics and PowerBI on Azure separatelly.As a result, we can confirm the data on PowerBI dashboard.

Power BI Dashboard

And also, I put the PIR motion sensor, camera and LED on RasPi. So if something had moved in front of motion sensor, it detected and turn on the LED and automatically take the phone of front of the camera. After take the photo, it upload the image to Azure Storage Blob. Azure Storage Explorer After uploaded the image, it send the URL to Cognitive Services as Face API and Emotion API. After received the result of analysis data, it showes the result to standard output as follow.

Show Result

How to run this Sample Application

    1. Need to create Azure IoT-Hub, Azure Storage on Azure.
    1. Need to get the access key for both above services.
    1. You need to create and get the Subscription ID of Cognitive Services.
    1. Get the source code from GitHub
    1. After get both access keys and subscription IDs, Please Edit the property files?
    1. Build the Application
    1. Confirm the build binary
$ cd RaspberryPi-To-Azure-IoT-Hub/target/
$ ls
    1. Copy the file to Raspberry Pi by scp
$ scp RaspberryPi-To-Azure-IoT-Hub-1.0-SNAPSHOT.jar  [email protected]:/home/pi/
    1. SSH Login to the Raspberry Pi
$ ssh -l pi 192.168.1.100
    1. Execute the Application on Raspberry Pi
$ sudo java -jar RaspberryPi-To-Azure-IoT-Hub-1.0-SNAPSHOT.jar  

How to place the sensors on Raspberry Pi 2.

How to place the LED

Connect LED

LED Raspberry Pi
anode (+) registor (Ω)
cathode (-) Grand
registor GPIO 1(pin12)

There is no need to connect "5.0 VDC Power (pin2)" in this time.

How to place the BME 280

Connect BME 280

BME 280 Raspberry Pi
VIN 5.0 VDC Power (pin2)
GND Ground(pin6)
SCK GPIO 9 SCL1(I2C:pin5)
SDO Ground(pin6)
SDI GPIO 8 SDA1(I2C:pin3)

How to place the PIR Motion Sensor

Connect PIR Motion Sensor

PIR Motion Sensor Raspberry Pi
+DC Voltage 5.0 VDC Power (pin2)
Output GPIO 4(pin16)
GND Ground(pin6)

###Pleaase note : For PIR motion sensor, you need to adjst the default sensor setting.

  1. I changed the Retriggering setting from "Low" to "High" by change the jumper pin. Please refer to the Testing a PIR of https://learn.adafruit.com?
  2. There is two yellow adjuster on the PIR Motion sensor. One is Sensitivity Adjust and the others is Time Delay Adjust. Please adjust by using yellow adjuster for your environment ?

Placed all sensors

Connect Sensor to RasPi

raspberrypi-to-azure-iot-hub's People

Contributors

yoshioterada avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.