Page 1 of 1

Has anyone used Mono on the FE boards ?

Posted: Sun Nov 12, 2017 2:56 pm
by mikemoy
I discovered Mono yesterday. I think this would be a great way to develop on my NanoPi Duo.

I installed it and tried all the examples and it worked just fine.
Now, the only thing that has be puzzled is how to use C# to gain access to the I/O pins on the Duo.
Has anyone here had any experience with Mono and GPIO ? Specifically, I would like to learn how to do SPI, I2C and general GPIO settings like inputs and outputs and toggle I/O pins.


Re: Has anyone used Mono on the FE boards ?

Posted: Mon Feb 11, 2019 7:51 am
by dennisctp
you can try installing wiringNP
and then use the Process class to run the gpio command

Code: Select all

Process proc = new Process();
proc.StartInfo = new ProcessStartInfo("gpio", "mode 0 out");
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;

where 0 is the pin number