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.
Sample by category
Our samples uses
Special beginner
Gpio, I2C, I2S, Spi, Pwm, Adc, Dac, 1-Wire, Serial
đļī¸ - 1-Wire sampleđļī¸ - Analogic/Digital converterđļī¸ - Analogic/Digital converterđļī¸ - Blink your first ledđļī¸ - Digital Analog Converter sampleđļī¸ - GPIO and events sampleđļī¸ - GPIO and events sample (.NET IoT style)đļī¸ - GPIO sample packđļī¸ - System.Device.Pwmđļī¸ - System.Device.PWM sampleđļī¸ - System.Device.Spi sampleđļī¸ tođļī¸ đļī¸ - System.IO.Ports serial Communication sampleđļī¸ đļī¸ - I2C sample sample packđļī¸ đļī¸ - I2C Scanner sampleđļī¸ đļī¸ - I2S Microphone sampleđļī¸ đļī¸ - I2S sample packđļī¸ đļī¸ - I2S Speaker sampleđļī¸ đļī¸ đļī¸ - 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đļī¸ đļī¸ -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đļī¸ đļī¸ - Bluetooth Low energy: read static and dynamic values, notification, read/write valueđļī¸ đļī¸ - Bluetooth Low energy: read/write with encryption a valueđļī¸ đļī¸ đļī¸ - Improv Wifi provisioning
CAN
ESP32 specific
đļī¸ - Hardware ESP32 Deep sleep sampleđļī¸ - Touch pad ESP32 sampleđļī¸ tođļī¸ đļī¸ đļī¸ - Bluetooth sample packđļī¸ đļī¸ - Hardware ESP32 RMT sample packđļī¸ đļī¸ - NeoPixel Strip WS2812 with RMTđļī¸ đļī¸ - NeoPixel Strip WS2812 with RMT low memoryđļī¸ đļī¸ - Infrared remote receiver based on VS1838 with RMTđļī¸ đļī¸ - Simple sample with Azure lib and retry pattern for connectionđļī¸ đļī¸ - Ultrasonic HC-SR04 sensor with RMTđļī¸ đļī¸ đļī¸ - 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đļī¸ đļī¸ -Simple WPFđļī¸ đļī¸ tođļī¸ đļī¸ đļī¸ -Graphics samplesđļī¸ đļī¸ đļī¸ - Tetris Demo Game for nanoFramework
IoT.Device
đļī¸ đļī¸ đļī¸ - 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đļī¸ đļī¸ đļī¸ - Using Azure SDK with BMP280 on M5Stack with .NET nanoFramework
Interop
Json
MQTT
đļī¸ đļī¸ tođļī¸ đļī¸ đļī¸ - MQTT sample packđļī¸ đļī¸ đļī¸ - Complete Azure MQTT sample using BMP280 sensor without Azure lib and with deep sleep
Networking including HTTP, SSL
đļī¸ - UdpClient sample packđļī¸ - WebSocket Client Sampleđļī¸ - WiFI samplesđļī¸ tođļī¸ đļī¸ - .NET nanoFramework Webserver sample packđļī¸ tođļī¸ đļī¸ - WebSocket sample packđļī¸ đļī¸ - HTTP Listener sampleđļī¸ đļī¸ - HTTP sample packđļī¸ đļī¸ - HTTP WebRequest sampleđļī¸ đļī¸ - Networking sample packđļī¸ đļī¸ - WebSocket Server Sample with RGB Ledđļī¸ đļī¸ - WebSocket ServerClient Sampleđļī¸ đļī¸ - Wifi Soft AP sampleđļī¸ đļī¸ tođļī¸ đļī¸ đļī¸ - MQTT sample packđļī¸ đļī¸ tođļī¸ đļī¸ đļī¸ - TLS sample packđļī¸ đļī¸ đļī¸ - HTTP.HttpAzureGET Sampleđļī¸ đļī¸ đļī¸ - HTTP.HttpAzurePOST Sample
Real Time Clock
STM32 Specific
đļī¸ - Giant Gecko Read Device IDsđļī¸ - STM32 Alarmđļī¸ - STM32 Read Device IDđļī¸ tođļī¸ đļī¸ - Hardware STM32 sample packđļī¸ đļī¸ - STM32 Backup Memoryđļī¸ đļī¸ - STM32 Power Mode
Texas Instrument specific
đļī¸ - Texas Instruments EasyLink sample packđļī¸ - TI utilitiesđļī¸ tođļī¸ đļī¸ - Hardware TI SimpleLink sample packđļī¸ đļī¸ - TI Power Mode
Tools and utilities
đļī¸ - Dependency injection sample packđļī¸ - Logging samplesđļī¸ - Unit Test framework sample packđļī¸ đļī¸ - Hosting sample pack
System related
đļī¸ - Collections sampleđļī¸ - Convert Base64 sample packđļī¸ - Debug Garbage Collector Testđļī¸ - GPIO and events sampleđļī¸ - GPIO and events sample (.NET IoT style)đļī¸ - Managed resources sampleđļī¸ - Number Parsing sample packđļī¸ - RTC sampleđļī¸ - System.Random sampleđļī¸ - ToString samplesđļī¸ tođļī¸ đļī¸ - Threading sample packđļī¸ đļī¸ - Execution Constraint demođļī¸ đļī¸ - GC stress testđļī¸ đļī¸ - Native events sampleđļī¸ đļī¸ - Reflection sample packđļī¸ đļī¸ đļī¸ - Interop sample
USB Client related
Wifi
Feedback and documentation
For documentation, providing feedback, issues and finding out how to contribute please refer to the Home repo.
Join our Discord community here.
Credits
The list of contributors to this project can be found at CONTRIBUTORS.
License
The nanoFramework samples are licensed under the MIT license.
Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.
.NET Foundation
This project is supported by the .NET Foundation.