Hello guys,
I just created a simple app using Visual Studio for MAC (Alpha Channel) and the template for Xamarin IoT Console Application, my demo tries to blink a led using the library "IoTSharp.Components.Raspbian" from nuget.
The raspberry has installed the latest version of raspbian at this time, I tried to run the app from VS to the raspberry but I got the following error:
System.TypeInitializationException: The type initializer for 'Unosquare.RaspberryIO.Pi' threw an exception.
And the InnerException contains:
System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
I'm pretty new to this so my first guessing was the error was caused by some kind of missing package so I just ran sudo apt-get install mono-complete but the result was exactly the same.
My code looks something like this
using System;
using System.Threading;
using IoTSharp.Components;
namespace PlantGrowHelper_Raspberry
{
class Program
{
static void Main(string[] args)
{
var x = new IoTPin(Connectors.GPIO6);
x.SetDirection(IoTPinDirection.DirectionOutInitiallyLow);
Thread.Sleep(5000);
x.Value = true;
Thread.Sleep(5000);
x.Value = false;
}
}
}
What I'm missing? I cant find much info about Xamarin.IoT on the net.
I'll appreciate your help