Skip to content

Instantly share code, notes, and snippets.

View sandervandevelde's full-sized avatar
💭
Let me add some value

Sander van de Velde sandervandevelde

💭
Let me add some value
View GitHub Profile
// Extended downlink formatter Kuando Busylight IoT Omega - LoRaWAN
// Copyright 2023 Sander van de Velde
// License: MIT
//
// This formatter supports both light changing downlink messages and command downlink messages.
//
//light change downlink example:
//{
// "red":255,
// "blue":1,
using System;
using Opc.UaFx;
using Opc.UaFx.Client;
namespace TraegerDiscoveryApp
{
/// <summary>
/// Traeger Nuget package needed: <PackageReference Include="Opc.UaFx.Advanced" Version="2.18.3" />
/// </summary>
/// <remarks>
@sandervandevelde
sandervandevelde / program.cs
Created August 14, 2020 15:43
Azure IoT device client SDK Example (.Net C#)
using Azure.Storage.Blobs;
using Microsoft.Azure.Devices.Client;
using Microsoft.Azure.Devices.Client.Transport;
using Microsoft.Azure.Devices.Shared;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading;
@sandervandevelde
sandervandevelde / gist:0be3d3313a85f3fc5343efb3e2d242f9
Created August 28, 2019 09:57
BlockBlob Generator module for testing IoT Edge Blob storage module
using System;
using System.IO;
using System.Runtime.Loader;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Devices.Client;
using Microsoft.Azure.Devices.Client.Transport.Mqtt;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full
// license information.
// This gist is based on https://github.com/Azure/iot-central-firmware/blob/master/ESP8266/ESP8266.ino
#include <ESP8266WiFi.h>
#include "src/iotc/common/string_buffer.h"
#include "src/iotc/iotc.h"
#r "Newtonsoft.Json"
using System.Net;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
public static async Task<IActionResult> Run(HttpRequest req, ILogger log)
{
log.LogInformation("DPS processed a request. ");