-
-
Save hatsunea/9bb9e3e6094b1e326fc79df9132f9e69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Device.Gpio; | |
using System.Threading; | |
namespace LedSample | |
{ | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var gpio = nanoFramework.M5Stack.M5Core2.GpioController; | |
var led = gpio.OpenPin(19, PinMode.Output); | |
nanoFramework.M5Stack.Console.Clear(); | |
while (true) | |
{ | |
Console.WriteLine("LED ON"); | |
led.Write(PinValue.High); | |
Thread.Sleep(2000); | |
Console.WriteLine("LED OFF"); | |
led.Write(PinValue.Low); | |
Thread.Sleep(2000); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment