Skip to content

ms-iotkithol-jp/DeviceEmulatorOnFunctions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Device Emulator On Functions

実デバイスめんどくさーい、じゃ、バーチャルマシン?それもたちあげんのめんどくせー。。。 というあなたへ
サーバーレスのAzure Functionsで気軽にAzure IoT Hubにセンサー情報を送信するデバイスエミュレータサンプルです。 Azure ポータルの説明を参考にして、 Azure Functionsで、タイマー起動の関数を作り、project.jsonを追加、run.csxを全部上書きして、 Azure Iot Hubに"emulator"という名前のデバイスを登録し、接続文字列をiothubcsに設定します。

    string iothubcs = "<< Device Connection String >>";

後は、時間間隔を5分から0分に変えて、できあがり。 1分ごとに加速度、温度、湿度、時間がIoT Hubに60秒分まとめて送付します。

{"time":"2017...","accelx":0.01,"accely":-0.02,"accelz":-0.9812,"temp":27.563,"ambience":27.563, "humidity":56.72, "pressure":1001.03}

IoT Kit Hands-on Ver4の入力デバイスとしても使えます。 ※ ただし、クラウドからこのデバイスエミュレータにコマンドを送ることはできません。(そのうち追加します)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages