AlirezaP
Published

NanoFramework Esp32

Control chip with Nano Framework

BeginnerFull instructions provided5 hours3,034
NanoFramework Esp32

Things used in this project

Hardware components

esp wroom32 dev board v1
×1
cp2102
×1
7 Segment LED Display, InfoVue
7 Segment LED Display, InfoVue
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

visual studio 2019
Visual Studio extension
.NET nanoFramework Visual Studio extension

Story

Read more

Schematics

Esp32

Esp32

Code

Simple GPIO

C#
set Low Some GPIO
using System;
using System.Diagnostics;
using System.Threading;
using Windows.Devices.Gpio;

namespace NFApp2
{
    public class Program
    {
        public static void Main()
        {
            Debug.WriteLine("Hello from nanoFramework!");

            var gpioController = new GpioController();

            GpioPin pin27 = GpioController.GetDefault().OpenPin(27);
            pin27.SetDriveMode(GpioPinDriveMode.Output);
            pin27.Write(GpioPinValue.Low);


            GpioPin pin26 = GpioController.GetDefault().OpenPin(26);
            pin26.SetDriveMode(GpioPinDriveMode.Output);
            pin26.Write(GpioPinValue.Low);


            GpioPin pin25 = GpioController.GetDefault().OpenPin(25);
            pin25.SetDriveMode(GpioPinDriveMode.Output);
            pin25.Write(GpioPinValue.Low);


            GpioPin pin33 = GpioController.GetDefault().OpenPin(33);
            pin33.SetDriveMode(GpioPinDriveMode.Output);
            pin33.Write(GpioPinValue.Low);


            GpioPin pin32 = GpioController.GetDefault().OpenPin(32);
            pin32.SetDriveMode(GpioPinDriveMode.Output);
            pin32.Write(GpioPinValue.Low);

            GpioPin pin35 = GpioController.GetDefault().OpenPin(35);
            pin35.SetDriveMode(GpioPinDriveMode.Output);
            pin35.Write(GpioPinValue.Low);


            GpioPin pin34 = GpioController.GetDefault().OpenPin(34);
            pin34.SetDriveMode(GpioPinDriveMode.Output);
            pin34.Write(GpioPinValue.Low);

            Thread.Sleep(Timeout.Infinite);

        }
    }
}

Credits

AlirezaP

AlirezaP

10 projects • 6 followers
I'm a .net developer
Thanks to Alireza Paridar.

Comments