Raspberry Pi 2 Libbcm2835异常与库RaspberryPiDotNet

时间:2015-08-28 16:25:26

标签: c# mono raspberry-pi monodevelop raspberry-pi2

我是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 

0 个答案:

没有答案