-
Update node by running:
$ update-nodejs-and-nodered
-
Download the code with git
$ git clone https://github.com/whelmed/iothub_rpi.git $ cd iothub_rpi
-
Install the dependencies
$ npm install
-
Edit the creds.js with your device credentials
- You can generate a new device in the Azure portal under the device blade of your IoT app
-
Edit the pins you're using in the pins.js file
-
Enable 1-wire
- sudo raspi-config
- Select Interfacing Options
- Navigate to and select SSH
- Choose Yes
- Select Ok
-
Reboot the device
$ sudo reboot
-
Load the 1-wire kernel modules
$ sudo modprobe w1-gpio $ sudo modprobe w1-therm
-
Run the code
$ nodejs app.js
-
Notifications
You must be signed in to change notification settings - Fork 1
whelmed/iothub_rpi
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
IoT Hub demo using a ds18x20 temperature sensor
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published