Asp.Net Core and Azure with Raspberry Pi 4 by Sibeesh Venu

Asp.Net Core and Azure with Raspberry Pi 4 by Sibeesh Venu

Author:Sibeesh Venu
Language: eng
Format: epub
ISBN: 9781484264430
Publisher: Apress


TwinCollection reportedProperties, telemetryConfig;

reportedProperties = new TwinCollection();

telemetryConfig = new TwinCollection();

telemetryConfig["sendFrequency"] = "5m";

reportedProperties["telemetryConfig"] = telemetryConfig;

await _deviceClient.UpdateReportedPropertiesAsync(reportedProperties).ConfigureAwait(false);

Console.WriteLine("Waiting 30 seconds for IoT Hub Twin updates...");

await Task.Delay(3 * 1000);

Here, sendFrequency is a property of the telemetryConfig twin collection. Here is the full code of the Program.cs class :using System;

using System.Text;

using Iot.Device.CpuTemperature;

using System.Threading;

using System.Threading.Tasks;

using Microsoft.Azure.Devices.Client;

using Newtonsoft.Json;

using raspberrypi.net.core.Models;

using Microsoft.Azure.Devices.Shared;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.