Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/nanoframework/samples
- Owner: nanoframework
- License: mit
- Created: 2017-09-15T07:43:51.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-10-25T03:28:58.000Z (3 months ago)
- Last Synced: 2024-10-29T21:06:16.809Z (3 months ago)
- Topics: embedded-systems, esp32, hacktoberfest, i-am-a-nano-tool, iot, nanoframework, stm32
- Language: C#
- Homepage: https://www.nanoframework.net
- Size: 7.95 MB
- Stars: 356
- Watchers: 28
- Forks: 146
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
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).