Access RPI GPIO

103 views
Skip to first unread message

Phil

unread,
Mar 25, 2022, 3:04:08 AM3/25/22
to Signal K
What is the best way to access the GPIO's in a plugin? 
How to we allow access without sudo?

Teppo Kurki

unread,
Mar 31, 2022, 12:39:10 PM3/31/22
to signalk
I think this is not really a plugin specific issue - googling for GPIO access without sudo brings some hits, including using pigpio.

On Fri, Mar 25, 2022 at 9:04 AM Phil <phil...@gmail.com> wrote:
What is the best way to access the GPIO's in a plugin? 
How to we allow access without sudo?

--
You received this message because you are subscribed to the Google Groups "Signal K" group.
To unsubscribe from this group and stop receiving emails from it, send an email to signalk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/signalk/cdd1a609-1c97-4e57-b11a-5282cf09c60en%40googlegroups.com.

Susanne Coates

unread,
Mar 31, 2022, 3:06:14 PM3/31/22
to sig...@googlegroups.com
I don't know if this would help you or not but I wrote a signal K plugin that lets you control LEDs (or relays) connected to the RPI's GPIO ports. You can download it here: https://github.com/susannecoates/signalk-scans-switch.
Susanne

Susanne Coates

unread,
Mar 31, 2022, 3:17:34 PM3/31/22
to sig...@googlegroups.com
Oh, and the plugin uses the onoff library which can be installed using:
npm install onoff

Phil begg

unread,
Mar 31, 2022, 4:30:52 PM3/31/22
to sig...@googlegroups.com
Hey Susanne, Teppo

Thanks for think link - I was searching the App Store for something to related to GPIO but I probably should have looked a bit harder. 
I ended up getting a fix for this in the last couple of days. I think I had some strange permissions set up on my Pi and could not get access to the GPIO pins at all. 
Added my user to the gpio group and i2c group and it’s now all working!

Reply all
Reply to author
Forward
0 new messages