Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nanoframework/samples

đŸŦ Code samples from the nanoFramework team used in testing, proof of concepts and other explorational endeavours
https://github.com/nanoframework/samples

embedded-systems esp32 hacktoberfest i-am-a-nano-tool iot nanoframework stm32

Last synced: 4 days ago
JSON representation

đŸŦ Code samples from the nanoFramework team used in testing, proof of concepts and other explorational endeavours

Awesome Lists containing this project

README

        

[![Discord](https://img.shields.io/discord/478725473862549535.svg)](https://discord.gg/gCyBu8T)

![nanoFramework logo](https://github.com/nanoframework/Home/blob/main/resources/logo/nanoFramework-repo-logo.png)

-----
Document Language: [English](README.md) | [įŽ€äŊ“中文](README.zh-cn.md)

# 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](https://github.com/rsuter/NuGetReferenceSwitcher).

If you are looking for Iot.Device samples, they are all in the [Iot.Device repository](https://github.com/nanoFramework/nanoFramework.IoT.Device).

## 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.

### Special beginner

* [đŸŒļī¸ - Blink your first led](samples/Blinky)
* [đŸŒļī¸ - Blink your first LED](samples/Beginner/BlinkLed)
* [đŸŒļī¸ - Press a button and light a LED](samples/Beginner/Button)
* [đŸŒļī¸ - Press a button and light a LED with a Button nuget](samples/Beginner/ButtonNuget)
* [đŸŒļī¸ - Pulse Width Modulation (PWM) and changing the light of a LED](samples/Beginner/PwmLed)
* [đŸŒļī¸ - Read a soil moisture sensor with Analog to Digital Converter (ADC)](samples/Beginner/AnalogRainSensor)
* [đŸŒļī¸ - Reading an AM2320 I2C Temerature and Humidity sensor](samples/Beginner/TempHumI2c)
* [đŸŒļī¸ - Special IoT beginner content with .NET nanoFramework](samples/Beginner)
* [đŸŒļī¸ - System.Device.Pwm](samples/PWM/System.Device.Pwm)
* [đŸŒļī¸ - ulse Width Modulation (PWM) to drive a servo motor](samples/Beginner/ServoMotor)

### Gpio, I2C, I2S, Spi, Pwm, Adc, Dac, 1-Wire, Serial

* [đŸŒļī¸ - 1-Wire sample](samples/1-Wire)
* [đŸŒļī¸ - Analogic/Digital converter](samples/ADC)
* [đŸŒļī¸ - Analogic/Digital converter](samples/GiantGecko.Adc)
* [đŸŒļī¸ - Blink your first led](samples/Blinky)
* [đŸŒļī¸ - Blink your first LED](samples/Beginner/BlinkLed)
* [đŸŒļī¸ - Digital Analog Converter sample](samples/DAC)
* [đŸŒļī¸ - ESP32 Pulse Counter sample](samples/Gpio/Esp32PulseCounter)
* [đŸŒļī¸ - GPIO and events sample](samples/Gpio/Gpio+Events)
* [đŸŒļī¸ - GPIO and events sample (.NET IoT style)](samples/Gpio/Gpio+EventsIoTStyle)
* [đŸŒļī¸ - GPIO sample pack](samples/Gpio)
* [đŸŒļī¸ - Press a button and light a LED](samples/Beginner/Button)
* [đŸŒļī¸ - Press a button and light a LED with a Button nuget](samples/Beginner/ButtonNuget)
* [đŸŒļī¸ - Pulse Width Modulation (PWM) and changing the light of a LED](samples/Beginner/PwmLed)
* [đŸŒļī¸ - Read a soil moisture sensor with Analog to Digital Converter (ADC)](samples/Beginner/AnalogRainSensor)
* [đŸŒļī¸ - Reading an AM2320 I2C Temerature and Humidity sensor](samples/Beginner/TempHumI2c)
* [đŸŒļī¸ - System.Device.Pwm](samples/PWM/System.Device.Pwm)
* [đŸŒļī¸ - System.Device.PWM sample](samples/PWM)
* [đŸŒļī¸ - System.Device.Spi sample](samples/SPI)
* [đŸŒļī¸ - ulse Width Modulation (PWM) to drive a servo motor](samples/Beginner/ServoMotor)
* [đŸŒļī¸ to đŸŒļī¸đŸŒļī¸ - System.IO.Ports serial Communication sample](samples/SerialCommunication)
* [đŸŒļī¸đŸŒļī¸ - I2C sample sample pack](samples/I2C)
* [đŸŒļī¸đŸŒļī¸ - I2C Scanner sample](samples/I2C/NanoI2cScanner)
* [đŸŒļī¸đŸŒļī¸ - I2S Microphone sample](samples/I2S/Input)
* [đŸŒļī¸đŸŒļī¸ - I2S sample pack](samples/I2S)
* [đŸŒļī¸đŸŒļī¸ - I2S Speaker sample](samples/I2S/Output)
* [đŸŒļī¸đŸŒļī¸ - WebServer to test pour Servo Motors](samples/Webserver/ServoMotorTester)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Using Azure SDK with BMP280 on M5Stack with .NET nanoFramework](samples/AzureSDK/AzureSDKSensorCertificate/Readme.md)

### AMQP

* [đŸŒļī¸đŸŒļī¸ - AMQP sample pack](samples/AMQP)
* [đŸŒļī¸đŸŒļī¸ - Azure Service Bus AMQP sample](samples/AMQP/Azure-ServiceBus-Sender)
* [đŸŒļī¸đŸŒļī¸ -Azure AMQP sample](samples/AMQP/Azure-IoT-Hub)

### Azure specific

* [đŸŒļī¸đŸŒļī¸ - AMQP sample pack](samples/AMQP)
* [đŸŒļī¸đŸŒļī¸ - Azure IoT Hub SDK with MQTT protocol](samples/AzureSDK/AzureSDK)
* [đŸŒļī¸đŸŒļī¸ - Azure IoT Plug & Play with MQTT protocol](samples/AzureSDK/AzureIoTPnP)
* [đŸŒļī¸đŸŒļī¸ - Azure Service Bus AMQP sample](samples/AMQP/Azure-ServiceBus-Sender)
* [đŸŒļī¸đŸŒļī¸ - Simple sample **with** Azure lib and retry pattern for connection](samples/AzureSDK/AzureSDKBasic)
* [đŸŒļī¸đŸŒļī¸ - Using a Modem like SIM7080, simple sample **with** Azure lib and retry pattern for connection](samples/AzureSDK/AzureSDKBasicFullyManaged)
* [đŸŒļī¸đŸŒļī¸ -Azure AMQP sample](samples/AMQP/Azure-IoT-Hub)
* [đŸŒļī¸đŸŒļī¸ to đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Azure SDK sample pack](samples/AzureSDK)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Azure Edge OTA example](samples/AzureSDK/AzureEdgeOta)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Complete Azure MQTT sample using BMP280 sensor **with** Azure lib and deep sleep](samples/AzureSDK/AzureSDKSleepBMP280)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Complete Azure MQTT sample using BMP280 sensor **without Azure lib** and with deep sleep](samples/AzureMQTTTwinsBMP280Sleep)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - HTTP.HttpAzureGET Sample](samples/HTTP/HttpAzureGET)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - HTTP.HttpAzurePOST Sample](samples/HTTP/HttpAzurePOST)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Using Azure SDK with BMP280 on M5Stack with .NET nanoFramework](samples/AzureSDK/AzureSDKSensorCertificate/Readme.md)
* [Azure IoT Device Provisioning Service (DPS) example](samples/AzureSDK/DpsSampleApp)

### Bluetooth

* [đŸŒļī¸ - Bluetooth Low Energy Serial profile sample](samples/Bluetooth/BluetoothLESerial)
* [đŸŒļī¸ - Bluetooth Low energy: adding, replacing services to the main service](samples/Bluetooth/BluetoothLESample3)
* [đŸŒļī¸ to đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Bluetooth sample pack](samples/Bluetooth)
* [đŸŒļī¸đŸŒļī¸ - Demonstrates how to use the watcher filter classes](samples/Bluetooth/WatcherFilters)
* [đŸŒļī¸đŸŒļī¸ - Bluetooth Low energy: Broadcast current values in a Bluetooth advertisement](samples/Bluetooth/BroadcastValues)
* [đŸŒļī¸đŸŒļī¸ - Bluetooth Low energy: Environmental Sensor data collection](samples/Bluetooth/Central2)
* [đŸŒļī¸đŸŒļī¸ - Bluetooth Low energy: read static and dynamic values, notification, read/write value](samples/Bluetooth/BluetoothLESample1)
* [đŸŒļī¸đŸŒļī¸ - Bluetooth Low energy: read/write with encryption a value](samples/Bluetooth/BluetoothLESample2)
* [đŸŒļī¸đŸŒļī¸ - Bluetooth Low energy: Watch for Bluetooth Advertisements](samples/Bluetooth/Central1)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Create an IBeacon](samples/Bluetooth/BluetoothBeacon)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Bluetooth Low energy: Demonstrates pairing and authentication in Client program](samples/Bluetooth/Central3)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Improv Wifi provisioning](samples/Bluetooth/ImprovWifi)

### CAN

* [đŸŒļī¸ - CAN sample](samples/CAN)

### ESP32 specific

* [đŸŒļī¸ - ESP32 Pulse Counter sample](samples/Gpio/Esp32PulseCounter)
* [đŸŒļī¸ - Hardware ESP32 Deep sleep sample](samples/Hardware.Esp32)
* [đŸŒļī¸ - Touch pad ESP32 sample](samples/TouchESP32)
* [đŸŒļī¸ to đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Bluetooth sample pack](samples/Bluetooth)
* [đŸŒļī¸đŸŒļī¸ - Hardware ESP32 RMT sample pack](samples/Hardware.Esp32.Rmt)
* [đŸŒļī¸đŸŒļī¸ - Infrared remote receiver based on VS1838 with RMT](samples/Hardware.Esp32.Rmt/InfraredRemoteReceiver)
* [đŸŒļī¸đŸŒļī¸ - NeoPixel Strip WS2812 with RMT](samples/Hardware.Esp32.Rmt/NeoPixelStrip)
* [đŸŒļī¸đŸŒļī¸ - NeoPixel Strip WS2812 with RMT low memory](samples/Hardware.Esp32.Rmt/NeoPixelStripLowMemory)
* [đŸŒļī¸đŸŒļī¸ - Simple sample **with** Azure lib and retry pattern for connection](samples/AzureSDK/AzureSDKBasic)
* [đŸŒļī¸đŸŒļī¸ - Ultrasonic HC-SR04 sensor with RMT](samples/Hardware.Esp32.Rmt/Ultrasonic)
* [đŸŒļī¸đŸŒļī¸ - Using a Modem like SIM7080, simple sample **with** Azure lib and retry pattern for connection](samples/AzureSDK/AzureSDKBasicFullyManaged)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Create an IBeacon](samples/Bluetooth/BluetoothBeacon)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Complete Azure MQTT sample using BMP280 sensor **with** Azure lib and deep sleep](samples/AzureSDK/AzureSDKSleepBMP280)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Complete Azure MQTT sample using BMP280 sensor **without Azure lib** and with deep sleep](samples/AzureMQTTTwinsBMP280Sleep)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Improv Wifi provisioning](samples/Bluetooth/ImprovWifi)

### File and storage access

* [đŸŒļī¸ - System.IO.FileSystem samples](samples/System.IO.FileSystem)

### Giant Gecko specific

* [đŸŒļī¸ to đŸŒļī¸đŸŒļī¸ - Giant Gecko hardware sample pack](samples/Hardware.GiantGecko)
* [đŸŒļī¸đŸŒļī¸ - Giant Gecko Power Mode](samples/Hardware.GiantGecko/GiantGecko.PowerMode)

### Graphics for screens

* [đŸŒļī¸đŸŒļī¸ - Graphics Primitives](samples/Graphics/Primitives)
* [đŸŒļī¸đŸŒļī¸ - Screen samples](samples/Graphics/Screens)
* [đŸŒļī¸đŸŒļī¸ - Using an existing generic graphic driver](samples/Graphics/UsingGenericDriver)
* [đŸŒļī¸đŸŒļī¸ -Simple WPF](samples/Graphics/SimpleWpf)
* [đŸŒļī¸đŸŒļī¸ to đŸŒļī¸đŸŒļī¸đŸŒļī¸ -Graphics samples](samples/Graphics)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Creating your own generic graphic driver](samples/Graphics/GenericDriver)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Tetris Demo Game for nanoFramework](samples/Graphics/Tetris)

### IoT.Device

* [đŸŒļī¸ - Press a button and light a LED with a Button nuget](samples/Beginner/ButtonNuget)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Complete Azure MQTT sample using BMP280 sensor **with** Azure lib and deep sleep](samples/AzureSDK/AzureSDKSleepBMP280)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Complete Azure MQTT sample using BMP280 sensor **without Azure lib** and with deep sleep](samples/AzureMQTTTwinsBMP280Sleep)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Using Azure SDK with BMP280 on M5Stack with .NET nanoFramework](samples/AzureSDK/AzureSDKSensorCertificate/Readme.md)

### Interop

* [đŸŒļī¸đŸŒļī¸ - Native events sample](samples/NativeEvents)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Interop sample](samples/Interop)

### Json

* [đŸŒļī¸đŸŒļī¸ - nanoFramework Json sample](samples/Json)

### MQTT

* [đŸŒļī¸đŸŒļī¸ to đŸŒļī¸đŸŒļī¸đŸŒļī¸ - MQTT sample pack](samples/MQTT)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Complete Azure MQTT sample using BMP280 sensor **without Azure lib** and with deep sleep](samples/AzureMQTTTwinsBMP280Sleep)

### Networking including HTTP, SSL

* [đŸŒļī¸ - UdpClient sample pack](samples/UdpClient)
* [đŸŒļī¸ - WebSocket Client Sample](samples/WebSockets/WebSockets.Client.Sample)
* [đŸŒļī¸ - WiFI samples](samples/Wifi)
* [đŸŒļī¸ to đŸŒļī¸đŸŒļī¸ - .NET **nanoFramework** Webserver sample pack](samples/Webserver)
* [đŸŒļī¸ to đŸŒļī¸đŸŒļī¸ - WebSocket sample pack](samples/WebSockets)
* [đŸŒļī¸đŸŒļī¸ - HTTP Listener sample](samples/HTTP/HttpListener)
* [đŸŒļī¸đŸŒļī¸ - HTTP sample pack](samples/HTTP)
* [đŸŒļī¸đŸŒļī¸ - HTTP WebRequest sample](samples/HTTP/HttpWebRequest)
* [đŸŒļī¸đŸŒļī¸ - Networking sample pack](samples/Networking)
* [đŸŒļī¸đŸŒļī¸ - OpenTHread Networking sample pack](samples/OpenThread)
* [đŸŒļī¸đŸŒļī¸ - WebServer to test pour Servo Motors](samples/Webserver/ServoMotorTester)
* [đŸŒļī¸đŸŒļī¸ - WebSocket Server Sample with RGB Led](samples/WebSockets/WebSockets.Server.RgbSample)
* [đŸŒļī¸đŸŒļī¸ - WebSocket ServerClient Sample](samples/WebSockets/Websockets.ServerClient.Sample)
* [đŸŒļī¸đŸŒļī¸ - Wifi Soft AP sample](samples/WiFiAP)
* [đŸŒļī¸đŸŒļī¸ to đŸŒļī¸đŸŒļī¸đŸŒļī¸ - MQTT sample pack](samples/MQTT)
* [đŸŒļī¸đŸŒļī¸ to đŸŒļī¸đŸŒļī¸đŸŒļī¸ - TLS sample pack](samples/SSL)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - HTTP.HttpAzureGET Sample](samples/HTTP/HttpAzureGET)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - HTTP.HttpAzurePOST Sample](samples/HTTP/HttpAzurePOST)

### Real Time Clock

* [đŸŒļī¸ - RTC sample](samples/RTC)

### STM32 Specific

* [đŸŒļī¸ - Giant Gecko Read Device IDs](samples/Hardware.GiantGecko/GiantGecko.ReadDeviceIDs)
* [đŸŒļī¸ - STM32 Alarm](samples/Hardware.Stm32/Stm32.TestAlarms)
* [đŸŒļī¸ - STM32 Read Device ID](samples/Hardware.Stm32/Stm32.ReadDeviceIDs)
* [đŸŒļī¸ to đŸŒļī¸đŸŒļī¸ - Hardware STM32 sample pack](samples/Hardware.Stm32)
* [đŸŒļī¸đŸŒļī¸ - STM32 Backup Memory](samples/Hardware.Stm32/Stm32.BackupMemory)
* [đŸŒļī¸đŸŒļī¸ - STM32 Power Mode](samples/Hardware.Stm32/Stm32.PowerMode)

### Texas Instrument specific

* [đŸŒļī¸ - Texas Instruments EasyLink sample pack](samples/TI.EasyLink)
* [đŸŒļī¸ - TI utilities read IEEE address](samples/Hardware.TI/TI.Utilities)
* [đŸŒļī¸ to đŸŒļī¸đŸŒļī¸ - Hardware TI SimpleLink sample pack](samples/Hardware.TI)
* [đŸŒļī¸đŸŒļī¸ - TI Power Mode](samples/Hardware.TI/TI.PowerMode)

### Tools and utilities

* [đŸŒļī¸ - Dependency injection sample pack](samples/DependencyInjection)
* [đŸŒļī¸ - Logging samples](samples/Logging)
* [đŸŒļī¸ - Unit Test framework sample pack](samples/UnitTest)
* [đŸŒļī¸đŸŒļī¸ - Hosting sample pack](samples/Hosting)

### System related

* [đŸŒļī¸ - Collections sample](samples/Collections)
* [đŸŒļī¸ - Convert Base64 sample pack](samples/Converter.Base64)
* [đŸŒļī¸ - Debug Garbage Collector Test](samples/DebugGC.Test)
* [đŸŒļī¸ - GPIO and events sample](samples/Gpio/Gpio+Events)
* [đŸŒļī¸ - GPIO and events sample (.NET IoT style)](samples/Gpio/Gpio+EventsIoTStyle)
* [đŸŒļī¸ - Managed resources sample](samples/ManagedResources)
* [đŸŒļī¸ - Number Parsing sample pack](samples/NumberParser)
* [đŸŒļī¸ - RTC sample](samples/Timer)
* [đŸŒļī¸ - System.Random sample](samples/System.Random)
* [đŸŒļī¸ - ToString samples](samples/ToStringTest)
* [đŸŒļī¸ to đŸŒļī¸đŸŒļī¸ - Threading sample pack](samples/Threading)
* [đŸŒļī¸đŸŒļī¸ - Execution Constraint demo](samples/ExecutionConstraint)
* [đŸŒļī¸đŸŒļī¸ - GC stress test](samples/GCStressTest)
* [đŸŒļī¸đŸŒļī¸ - Native events sample](samples/NativeEvents)
* [đŸŒļī¸đŸŒļī¸ - Reflection sample pack](samples/Reflection)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Interop sample](samples/Interop)

### USB Client related

* [đŸŒļī¸đŸŒļī¸ - System.Device.UsbClient sample pack](samples/UsbClient)

### Wifi

* [đŸŒļī¸ - WiFI samples](samples/Wifi)
* [đŸŒļī¸đŸŒļī¸ - Wifi Soft AP sample](samples/WiFiAP)
* [đŸŒļī¸đŸŒļī¸đŸŒļī¸ - Improv Wifi provisioning](samples/Bluetooth/ImprovWifi)

## Feedback and documentation

For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).

Join our Discord community [here](https://discord.gg/gCyBu8T).

## Credits

The list of contributors to this project can be found at [CONTRIBUTORS](https://github.com/nanoframework/Home/blob/main/CONTRIBUTORS.md).

## License

The **nanoFramework** samples are licensed under the [MIT license](LICENSE.md).

## 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](https://dotnetfoundation.org/code-of-conduct).

### .NET Foundation

This project is supported by the [.NET Foundation](https://dotnetfoundation.org).