Belay.NETConnect C# Applications to Hardware Instantly
A .NET library that lets your desktop applications communicate with MicroPython devices as easily as calling a method. No embedded programming knowledge required.
A .NET library that lets your desktop applications communicate with MicroPython devices as easily as calling a method. No embedded programming knowledge required.
Belay.NET is a .NET library that bridges the gap between your C# desktop applications and MicroPython hardware. Think of it as a communication layer that lets you treat microcontrollers like remote objects in your application.
Instead of learning embedded programming, writing firmware, or dealing with serial communication protocols, you simply:
It's designed for C# developers who need to connect to hardware quickly without becoming embedded systems experts.
Connecting C# desktop applications to hardware is unnecessarily complex. Traditional approaches require:
β Learning embedded programming languages
β Writing and deploying firmware
β Managing serial communication protocols
β Handling device state and error conditions
β Converting between data formats manually
Belay.NET eliminates this complexity:
β
No firmware needed - Works with standard MicroPython
β
No serial protocols - Handled automatically
β
No embedded knowledge - Write familiar C# code
β
Type safety - Get compile-time checking and IntelliSense
β
Error handling - Comprehensive exception management
Simply plug in your MicroPython device via USB. Belay.NET handles the communication protocol automatically.
Create C# classes that represent your hardware. Use attributes to mark methods that should run on the device.
Call your C# methods normally. Belay.NET translates and executes them on the microcontroller, returning typed results.
Transform complex hardware control into simple C# method calls:
// Install: dotnet add package Belay.NET
public class SmartSensor : Device
{
[Setup]
public async Task InitializeAsync() =>
await ExecuteAsync("from machine import Pin, ADC; sensor = ADC(Pin(26))");
[Task(Cache = true, TimeoutMs = 5000)]
public async Task<float> ReadTemperatureAsync() =>
await ExecuteAsync<float>("sensor.read_u16() * 3.3 / 65536 * 100");
[Task]
public async Task<bool> SetLedAsync(bool state) =>
await ExecuteAsync<bool>($"led.{'on' if state else 'off'}(); True");
}
// Use like any other .NET classβno hardware knowledge required
var sensor = new SmartSensor();
await sensor.ConnectAsync("COM3");
await sensor.InitializeAsync();
var temperature = await sensor.ReadTemperatureAsync();
Console.WriteLine($"Current temperature: {temperature}Β°C");
Control PLCs, sensors, and actuators from .NET applications. Build SCADA systems with familiar tools and deployment patterns.
Create intelligent home automation with ASP.NET Core backends that directly control IoT devices. Build dashboards with Blazor or React.
Build research instruments and monitoring systems. Store data directly to SQL Server, Entity Framework, or cloud databases.
Teach IoT concepts without the complexity of embedded programming. Students learn hardware control using familiar C# syntax.
Full MicroPython and CircuitPython support
Fully SupportedWiFi-enabled microcontroller with rich peripherals
Fully SupportedOriginal MicroPython development board
Fully SupportedAdafruit's education-focused Python variant
Beta Support