View: 15183|Reply: 2

Writing to GPIO pins on Orange Pi Zero with Mono

[Copy link]

2

threads

2

posts

26

credits

Novice

Rank: 1

credits
26
Published in 2019-7-10 20:47:04 | Show all floors |Read mode
Hi


I wrote a Mono app for Armbian Ubuntu running on an Orange Pi Zero to read incoming telemetry data from the serial port.That part is working fine, but I now need to activate one of the pins on the GPIO. I simply have to occasionally set pin 19 to high for about a second and then clear it again.
Unfortunately, I'm struggling quite a bit with this. Whereas reading the serial port was relatively easy, I'm quite lost on writing to a GPIO pin with Mono.
If any one has any pointers I'd greatly appreciate it. Perhaps a sample or an idea of which library I should be using would be greatly appreciated. Thank you

27

threads

58

posts

2462

credits

Gold member

Rank: 6Rank: 6

credits
2462
Published in 2019-11-1 04:05:32 | Show all floors
In Armbian, something like the following would set the GPIO's

  1. # echo "5" >/sys/class/gpio/export
  2. # echo "out" >/sys/class/gpio/gpio5/direction
  3. # echo "1" > /sys/class/gpio/gpio5/value
Copy code

23

threads

119

posts

428

credits

Intermediate member

Rank: 3Rank: 3

credits
428
Published in yesterday 23:44 | Show all floors
Managing telemetry data and hardware pins requires a high level of precision and reliability. For those who appreciate the same level of performance in their digital entertainment, spino gambino casino offers a premier experience for players, featuring fast payouts and exceptional rewards. It is the perfect place to relax after a long day of coding and hardware debugging.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list