Samples
đŦ Code samples from the nanoFramework team used in testing, proof of concepts and other explorational endeavours
Install / Use
/learn @nanoframework/SamplesREADME

Document Language: English | įŽäŊ䏿
Welcome to the nanoFramework team code samples repository!
This repo contains code samples used by the team when testing, working on proof of concepts for new and improved features and other explorational endeavours. Feel free to browse, take what you like and contribute back if you want.
Note: sometimes it's convenient to reference the source code instead of the NuGet packages in projects that require debugging by following the execution flow into other projects or even class libraries. For that we recommend using a very handy Visual Studio extension that allows NuGet assembly references to project references switching. That's NuGet Reference Switcher.
If you are looking for Iot.Device samples, they are all in the Iot.Device repository.
AI agent guidance
If you're using GitHub Copilot custom agents in VS Code or Visual Studio, this repository includes a nanoFramework-specific agent definition with guidance for API compatibility checks, build workflow, and testing:
Sample by category
Our samples uses đļī¸ to show how easy or complicated those samples are. The samples with đļī¸ are easy and recommended for beginners. The ones with đļī¸đļī¸đļī¸ are more advanced and requires some knowledge. This knowledge may not be on .NET nanoFramework but on some other elements like certificates or networking for example.
<devices>Special beginner
- đļī¸ - Blink your first led
- đļī¸ - Blink your first LED
- đļī¸ - Press a button and light a LED
- đļī¸ - Press a button and light a LED with a Button nuget
- đļī¸ - Pulse Width Modulation (PWM) and changing the light of a LED
- đļī¸ - Read a soil moisture sensor with Analog to Digital Converter (ADC)
- đļī¸ - Reading an AM2320 I2C Temerature and Humidity sensor
- đļī¸ - Special IoT beginner content with .NET nanoFramework
- đļī¸ - System.Device.Pwm
- đļī¸ - Pulse Width Modulation (PWM) to drive a servo motor
Gpio, I2C, I2S, Spi, Pwm, Adc, Dac, 1-Wire, Serial
- đļī¸ - 1-Wire sample
- đļī¸ - Analogic/Digital converter
- đļī¸ - Analogic/Digital converter
- đļī¸ - Blink your first led
- đļī¸ - Blink your first LED
- đļī¸ - Digital Analog Converter sample
- đļī¸ - ESP32 Pulse Counter sample
- đļī¸ - GPIO and events sample
- đļī¸ - GPIO and events sample (.NET IoT style)
- đļī¸ - GPIO sample pack
- đļī¸ - Press a button and light a LED
- đļī¸ - Press a button and light a LED with a Button nuget
- đļī¸ - Pulse Width Modulation (PWM) and changing the light of a LED
- đļī¸ - Read a soil moisture sensor with Analog to Digital Converter (ADC)
- đļī¸ - Reading an AM2320 I2C Temerature and Humidity sensor
- đļī¸ - System.Device.Pwm
- đļī¸ - System.Device.PWM sample
- đļī¸ - System.Device.Spi sample
- đļī¸ - ulse Width Modulation (PWM) to drive a servo motor
- đļī¸ to đļī¸đļī¸ - System.IO.Ports serial Communication sample
- đļī¸đļī¸ - I2C sample sample pack
- đļī¸đļī¸ - I2C Scanner sample
- đļī¸đļī¸ - I2S Microphone sample
- đļī¸đļī¸ - I2S sample pack
- đļī¸đļī¸ - I2S Speaker sample
- đļī¸đļī¸ - WebServer to test pour Servo Motors
- đļī¸đļī¸đļī¸ - Using Azure SDK with BMP280 on M5Stack with .NET nanoFramework
AMQP
- đļī¸đļī¸ - AMQP sample pack
- đļī¸đļī¸ - Azure Service Bus AMQP sample
- đļī¸đļī¸ -Azure AMQP sample
Azure specific
- đļī¸đļī¸ - AMQP sample pack
- đļī¸đļī¸ - Azure IoT Hub SDK with MQTT protocol
- đļī¸đļī¸ - Azure IoT Plug & Play with MQTT protocol
- đļī¸đļī¸ - Azure Service Bus AMQP sample
- đļī¸đļī¸ - Simple sample with Azure lib and retry pattern for connection
- đļī¸đļī¸ - Using a Modem like SIM7080, simple sample with Azure lib and retry pattern for connection
- đļī¸đļī¸ -Azure AMQP sample
- đļī¸đļī¸ to đļī¸đļī¸đļī¸ - Azure SDK sample pack
- đļī¸đļī¸đļī¸ - Azure Edge OTA example
- đļī¸đļī¸đļī¸ - Complete Azure MQTT sample using BMP280 sensor with Azure lib and deep sleep
- đļī¸đļī¸đļī¸ - Complete Azure MQTT sample using BMP280 sensor without Azure lib and with deep sleep
- đļī¸đļī¸đļī¸ - HTTP.HttpAzureGET Sample
- đļī¸đļī¸đļī¸ - HTTP.HttpAzurePOST Sample
- đļī¸đļī¸đļī¸ - Using Azure SDK with BMP280 on M5Stack with .NET nanoFramework
- Azure IoT Device Provisioning Service (DPS) example
Bluetooth
- đļī¸ - Bluetooth Low Energy Serial profile sample
- đļī¸ - Bluetooth Low energy: adding, replacing services to the main service
- đļī¸ to đļī¸đļī¸đļī¸ - Bluetooth sample pack
- đļī¸đļī¸ - Demonstrates how to use the watcher filter classes
- đļī¸đļī¸ - Bluetooth Low energy: Broadcast current values in a Bluetooth advertisement
- đļī¸đļī¸ - Bluetooth Low energy: Environmental Sensor data collection
- đļī¸đļī¸ - Bluetooth Low energy: read static and dynamic values, notification, read/write value
- đļī¸đļī¸ - Bluetooth Low energy: read/write with encryption a value
- đļī¸đļī¸ - Bluetooth Low energy: Watch for Bluetooth Advertisements
- đļī¸đļī¸đļī¸ - Create an IBeacon
- đļī¸đļī¸đļī¸ - Bluetooth Low energy: Demonstrates pairing and authentication in Client program
- đļī¸đļī¸đļī¸ - Improv Wifi provisioning
CAN
ESP32 specific
- đļī¸ - ESP32 Pulse Counter sample
- đļī¸ - Hardware ESP32 Deep sleep sample
- đļī¸ - Touch pad ESP32 sample
- đļī¸ to đļī¸đļī¸đļī¸ - Bluetooth sample pack
- đļī¸đļī¸ - Hardware ESP32 RMT sample pack
- đļī¸đļī¸ - Infrared remote receiver based on VS1838 with RMT
- đļī¸đļī¸ - NeoPixel Strip WS2812 with RMT
- đļī¸đļī¸ - NeoPixel Strip WS2812 with RMT low memory
- đļī¸đļī¸ - Simple sample with Azure lib and retry pattern for connection
- đļī¸đļī¸ - Ultrasonic HC-SR04 sensor with RMT
- đļī¸đļī¸ - Using a Modem like SIM7080, simple sample with Azure lib and retry pattern for connection
- đļī¸đļī¸đļī¸ - Create an IBeacon
- đļī¸đļī¸đļī¸ - Complete Azure MQTT sample using BMP280 sensor with Azure lib and deep sleep
- đļī¸đļī¸đļī¸ - Complete Azure MQTT sample using BMP280 sensor without Azure lib and with deep sleep
- đļī¸đļī¸đļī¸ - Improv Wifi provisioning
File and storage access
Giant Gecko specific
- đļī¸ to đļī¸đļī¸ - Giant Gecko hardware sample pack
- đļī¸đļī¸ - Giant Gecko Power Mode
Graphics for screens
- đļī¸đļī¸ - Graphics Primitives
- đļī¸đļī¸ - Screen samples
- đļī¸đļī¸ - Using an existing generic graphic driver
- đļī¸đļī¸ -Simple WPF
- đļī¸đļī¸ to đļī¸đļī¸đļī¸ -Graphics samples
- đļī¸đļī¸đļī¸ - Creating your own generic graphic driver
- đļī¸đļī¸đļī¸ - Tetris Demo Game for nanoFramework
