RPi.GPIO won't work on my Odroid XU4

Post Reply
mfarrier
Posts: 2
Joined: Fri Jul 16, 2021 5:12 am
languages_spoken: english
ODROIDs: Odroid XU4
Has thanked: 1 time
Been thanked: 0
Contact:

RPi.GPIO won't work on my Odroid XU4

Post by mfarrier »

I installed RPi.GPIO-Odroid on my Ubuntu Odroid XU4 using these instructions: https://wiki.odroid.com/odroid-xu4/appl ... o/rpi.gpio

I added the library to my code with the line: import RPi.GPIO as GPIO
When I tried to run my code I got a "This module only works on Raspberry Pis" error.

I tried replacing the line with "import RPi.GPIO-Odroid" and "import RPI.GPIOOdroid" (with the later one I also renamed the folder that was holding the GPIO-Odroid library), but none of those would compile.

Is there some way to resolve this issue?

User avatar
odroid
Site Admin
Posts: 38030
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1997 times
Been thanked: 1205 times
Contact:

Re: RPi.GPIO won't work on my Odroid XU4

Post by odroid »

You should install our own WiringPi library first.
https://wiki.odroid.com/odroid-xu4/appl ... o/wiringpi
These users thanked the author odroid for the post:
mfarrier (Fri Jul 16, 2021 9:12 pm)

mfarrier
Posts: 2
Joined: Fri Jul 16, 2021 5:12 am
languages_spoken: english
ODROIDs: Odroid XU4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: RPi.GPIO won't work on my Odroid XU4

Post by mfarrier »

Hello,

I installed the WiringPi module and then I went back deleted then reinstalled the RPi.GPIO module. I am still getting a "this module can only be run on a Raspberry Pi!" error.

Is there something else that I could be doing wrong?

Thanks

User avatar
mad_ady
Posts: 9662
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 609 times
Been thanked: 719 times
Contact:

Re: RPi.GPIO won't work on my Odroid XU4

Post by mad_ady »

You need to install HardKernel's wiringpi implementation, not the default wiringpi module. Hardkernel maintains a fork adding support for their boards.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 7 guests