标签:连接 net 软连接 ros mkdir pre console targe bsp
一、在树莓派中安装.NET Core运行时
using System; using System.Device.Gpio; using System.Threading; namespace ConsoleApp3 { class Program { static void Main(string[] args) { int pin1 = 17, pin2 = 23; using var gpio = new GpioController(PinNumberingScheme.Logical); gpio.OpenPin(pin1, PinMode.Output); gpio.OpenPin(pin2, PinMode.Output); var flag = false; for (int i = 0; i < 200; i++) { var pv1 = flag ? PinValue.High : PinValue.Low; var pv2 = !flag ? PinValue.High : PinValue.Low; flag = !flag; gpio.Write(pin1, pv1); gpio.Write(pin2, pv2); Thread.Sleep(500); } } } }
.NET Core嵌入式编程开关量GPIO(控制2个灯泡交替闪烁)
标签:连接 net 软连接 ros mkdir pre console targe bsp
原文地址:https://www.cnblogs.com/kgxk/p/12078609.html