unosquare / raspberryio

The Raspberry Pi's IO Functionality in an easy-to-use API for Mono/.NET/C#
https://unosquare.github.io/raspberryio
Other
672 stars 104 forks source link

Issues with an executable (C#) and sudo #225

Closed evericat closed 3 years ago

evericat commented 4 years ago

Hi, first of all I am using Raspberry Pi 4 with Raspbian.

I've made an executable in C # (Mono project) that uses the "unosquare/raspberryio" library for GPIO, SPI and I2C communication.

If I run it as a pi user: mono ./program.exe -> Everything works fine. If I run it as sudo: sudo mono ./program.exe -> It doesn't work.

It's weird because I have another SD with Raspbian that does work properly running with sudo ...

evericat commented 4 years ago

I can add more info:

Same raspbian image with same executable:

  1. Running from Raspberry PI 4B: sudo mono ./program.exe -> It doesn't not work.
  2. Running from Raspberry PI 3B: sudo mono ./program.exe -> Everything works OK.

So it seems a problem related with the hardware of Raspi 4B that executing a mono/unosquare/raspberryio program with mono does not work, and it works perfectly with Raspi 3B.

Any help with this?

I need to run this program at starting of Raspbian desktop, and the current script runs it as sudo, so with Raspi 4B it does not work...

Thanks :D

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.