Can now run the DHT22 sensor functionality, as in previous Telemetry post, using Device Streaming. Also can remotely control a DC motor using Device streaming! How good is that!

The az-iothub-ps set of PowerShell scripts has been extended again: Building upon the .NET Core GitHub project djaus2/DNETCoreGPIO, there is now a pair of apps under Device Streaming that runs on the RPi that sends real Telemetry data to the IoT Hub upon commands from the remote service app.. Uses a DHT22 sensor. Only works on Raspbian though.
There is also a another pair of apps where the service app sends commands to the device to control a DC Motor.

The az-iothub-ps repository

  • set-path.ps1 and get-iothub.ps1 are in the PS folder
    • Run ./set-path first
    • Then run get-iothub to create a hub if needed and to get hub metatdata (connection strings).
  • quickstarts folder is in ps\qs-apps under which are app folders.

How To

  • See the setup (including wiring) is in djaus2/DNETCoreGPIO repository
  • Set up the IoT Hub as previous using get-iothub PS script and get the environment variables into bash set-env.ps1 scripts, as previous (batch file coming).
  • Look for the app folders:
    • ps\qs-apps\quickstarts\device-streams\device-streams-cmds
      • Run device-RPi only on Raspbian
    • ps\qs-apps\quickstarts\device-streams\device-streams-cmds-motor
      • Run device-RPi on Raspbian or IoT-Core

With both run the relevant service app on the desktop, with the same connection settings: - Run the or set-env.ps1 (depending upon the OS) script on the device as previous ## More One more 2Do: Motor app via Telemetry.

 This Category Links 
Category:IoT Index:IoT
  Next: > .Net Core on IoT
<  Prev:   Now for some HW on the RPi