Samples icon indicating copy to clipboard operation
Samples copied to clipboard

🍬 Code samples from the nanoFramework team used in testing, proof of concepts and other explorational endeavours

Discord

nanoFramework logo


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

Special beginner

  • Blink your first led
  • System.Device.Pwm

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

  • 1-Wire sample
  • 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
  • I2C GPS sample
  • I2C sample sample pack
  • I2C Scanner sample
  • System.Device.Pwm
  • System.Device.PWM sample
  • System.Device.Spi sample
  • System.IO.Ports serial Communication sample
  • Using Azure SDK with BMP280 on M5Stack with .NET nanoFramework

AMQP

  • AMQP sample pack
  • Azure AMQP sample
  • Azure Service Bus AMQP sample

Azure specific

  • AMQP sample pack
  • Azure AMQP sample
  • Azure Edge OTA example
  • Azure IoT Device Provisioning Service (DPS) example
  • Azure IoT Hub SDK with MQTT protocol
  • Azure IoT Plug & Play with MQTT protocol
  • Azure SDK sample pack
  • Azure Service Bus AMQP sample
  • Complete Azure MQTT sample using BMP280 sensor with Azure lib
  • Complete Azure MQTT sample using BMP280 sensor without Azure lib
  • HTTP.HttpAzureGET Sample
  • HTTP.HttpAzurePOST Sample
  • Using Azure SDK with BMP280 on M5Stack with .NET nanoFramework

Bluetooth

  • Bluetooth Low Energy Serial profile sample
  • Bluetooth Low energy: adding, replacing services to the main service
  • Bluetooth Low energy: read static and dynamic values, notification, read/write value
  • Bluetooth Low energy: read/write with encryption a value
  • Bluetooth samples

CAN

  • CAN sample

ESP32 specific

  • Bluetooth samples
  • Complete Azure MQTT sample using BMP280 sensor with Azure lib
  • Complete Azure MQTT sample using BMP280 sensor without Azure lib
  • Hardware ESP32 Deep sleep sample
  • Hardware ESP32 RMT sample pack
  • NeoPixel Strip WS2812 with RMT
  • NeoPixel Strip WS2812 with RMT low memory
  • Ultrasonic HC-SR04 sensor with RMT

File and storage access

  • System.IO.FileSystem samples
  • Windows.Storage sample pack

Graphics for screens

  • Graphics Primitives
  • Graphics samples
  • Screen samples
  • Simple WPF
  • Tetris Demo Game for nanoFramework

IoT.Device

  • Complete Azure MQTT sample using BMP280 sensor with Azure lib
  • Complete Azure MQTT sample using BMP280 sensor without Azure lib
  • Using Azure SDK with BMP280 on M5Stack with .NET nanoFramework

Interop

  • Interop sample
  • Native events sample

Json

  • nanoFramework Json sample

MQTT

  • Complete Azure MQTT sample using BMP280 sensor without Azure lib
  • MQTT sample pack

Networking including HTTP, SSL

  • .NET nanoFramework Webserver sample pack
  • HTTP Listener sample
  • HTTP sample pack
  • HTTP WebRequest sample
  • HTTP.HttpAzureGET Sample
  • HTTP.HttpAzurePOST Sample
  • MQTT sample pack
  • Networking sample pack
  • TLS sample pack
  • UdpClient sample pack
  • WebSocket Client Sample
  • WebSocket Client Sample
  • WebSocket sample pack
  • WebSocket Server Sample
  • WiFI samples
  • Wifi Soft AP sample

Real Time Clock

  • RTC sample

STM32 Specific

  • Hardware STM32 sample pack
  • STM32 Alarm
  • STM32 Backup Memory
  • STM32 Power Mode
  • STM32 Read Device ID

Texas Instrument specific

  • Hardware TI SimpleLink sample pack
  • Texas Instruments EasyLink sample pack
  • TI Power Mode
  • TI utilities

Tools and utilities

  • Dependency injection sample pack
  • Hosting sample pack
  • Logging samples
  • Unit Test framework sample pack

System related

  • Collections sample
  • Convert Base64 sample pack
  • Debug Garbage Collector Test
  • Execution Constraint demo
  • GC stress test
  • GPIO and events sample
  • GPIO and events sample (.NET IoT style)
  • Interop sample
  • Managed resources sample
  • Native events sample
  • Number Parsing sample pack
  • Reflection sample pack
  • RTC sample
  • System.Random sample
  • Threading sample pack
  • ToString samples

Wifi

  • WiFI samples
  • Wifi Soft AP sample

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.