GithubHelp home page GithubHelp logo

isabella232 / iot-hub-node-intel-edison-client-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/iot-hub-node-intel-edison-client-app

0.0 0.0 0.0 9 KB

Application collects weather data from a Grove temperature sensor and sends it to IoT hub, also take actions according to cloud-to-device message, device management.

Home Page: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-intel-edison-kit-node-get-started

License: MIT License

JavaScript 100.00%

iot-hub-node-intel-edison-client-app's Introduction

services platforms author
iot-hub
nodejs
xshi

IoT Hub Intel Edison Client application

Build Status

This repo contains the source code to help you get familiar with Azure IoT using the Microsoft IoT Pack for Intel Edison Starter Kit. You will find the lesson-based tutorials on Azure.com.

This repo contains an nodejs application that runs on Intel Edison with a Grove temperature sensor, and then sends these data to your IoT hub. At the same time, this application receives Cloud-to-Device message from your IoT hub, and takes actions according to the C2D command.

Set up your edison

Follow this page to set up your edison and enable SSH. Then connect the Grove temperature sensor.

Connect your sensor with your edison

Connect with a physical Grove temperature sensor and LED

You can follow the image to connect your Grove temperature sensor and a LED with your Intel Edison.

Grove temperature sensor

DON'T HAVE A PHYSICAL Grove temperature sensor?

You can use the application to simulate temperature data and send to your IoT hub.

  1. Open the config.json file.
  2. Change the simulatedData value from false to true.

Running this sample

Install package

Install all packages by the following command, it may take serval minutes to complete:

npm install

Run your client application

Run the client application with root priviledge, and you also need provide your Azure IoT hub device connection string, note your connection should be quoted in the command.

sudo node index.js '<your Azure IoT hub device connection string>'

Send Cloud-to-Device command

You can send a C2D message to your device. You can see the device prints out the message and blinks once receiving the message.

Send Device Method command

You can send start or stop device method command to your Pi to start/stop sending message to your IoT hub.

iot-hub-node-intel-edison-client-app's People

Contributors

microsoftopensource avatar msftgits avatar yuwzho 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.