Giter Club home page Giter Club logo

tiltsensor's Introduction

Tilt Sensor Project

IoT Raspberry Pi project built on Microsoft IoT Core platform in Visual Studio Community 2015 using a tilt sensor and LEDs. One LED lights up based on if the tilt sensor senses tilt (on if yes, off if no). Another LED lights up periodically to signify a check if there is tilting or not. If at those checks the tilt sensor is tilting, then that will be recorded as a tilt. After a certain number of tilts, the third LED will light up to signal a notification is being sent to Azure Event Hub.

Hardware

  • Raspberry Pi 2 Model B v1.1
  • Tilt Sensor (ex. Keyes KY-020)

Technologies

  • Windows 10 IoT Core
  • Windows UWP App on Pi
  • Windows UWP IoT Extension
  • Azure IoT Hub
  • Azure Stream Analytics Job
  • Azure Event Hub
  • Azure Logic App
  • Office 365

Azure Setup

Architecture

  1. Create the IoT Hub

  2. Create Service Bus Queue

  3. Create a Stream Analytics Job with input from the IoT Hub and output to the queue with the query

    SELECT
        *
    INTO
        [tiltsensoroutput]
    FROM
        [tiltsensorinput]
    WHERE
        IotHub.ConnectionDeviceId LIKE 'TiltSensor'
  4. Create a Logic App to trigger on new message in the queue and send to email, SMS with twilio, or to do whatever you'd like!

    logic app

Steps to Run This Project

  1. Download all of the files in the repository
  2. Open the solution in Visual Studio
  3. Update the local_settings.cs file with your device connection string and save it
  4. Change the run mode in Visual Studio to Remote Machine
  5. Update the IP Address of the Remote Connection
    • (Option A). If the Remote Connection window appeared after step 4, update the IP address with your IoT device IP address
    • (Option B) Otherwise, double click on Properties in the Solution Explorer and update the Debug section with your IoT device's IP address
  6. Nuget packages may need to be restored and project may need to be built or rebuilt and few times.
  7. Run the project on the Remote Machine

Loading This Project as Startup on Device

  1. Follow the instructions here to begin a PowerShell connection to the device (have patience here)
  2. Use the commands here to set the startup project
    • For this project, you will need to find the name of the project after it has been deployed to the device by using IotStartup list headless
    • Then, use the command IotStartup startup headless [Task1] and paste in the name of the project for [Task1]

tiltsensor's People

Contributors

kottofy avatar

Stargazers

Jeff Jones avatar

Watchers

 avatar

tiltsensor's Issues

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.