我是Raspberry pi的新手。
我正在使用monodevelop,在我导入库RaspberryPiDotNew
以控制GPIO之后 -
我运行了一个简单的脚本并获得了一个例外:
using System;
using RaspberryPiDotNet;
namespace Test
{
class Program
{
static void Main(string[] args)
{
GPIOMem led = new GPIOMem(GPIOPins.V2_GPIO_12)
while(true)
{
led.Write(PinState.High);
System.Threading.Thread.Sleep(500);
led.Write(PinState.Low);
System.Threading.Thread.Sleep(500);
}
}
}
}
我收到错误System.TypeInitializationException has been thrown
System.TypeInitializationException : An exception was thrown by the type initializer for RassberryPiDotNet.GPIOMem --->System.Exception:libbcm2835.so
at (wrapper managed-to-native)RaspberryPiDontNet.GPIOMem:bcm2835_init()
at RaspberryPiDotNet.GPIOMem..cctor()[0x00001]in