Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to detect GPIO pins in python #1099

Open
mgodbole1729 opened this issue Oct 31, 2022 · 2 comments
Open

Unable to detect GPIO pins in python #1099

mgodbole1729 opened this issue Oct 31, 2022 · 2 comments

Comments

@mgodbole1729
Copy link

I'm trying to access the GPIO pins via the DIO input on IEI Tank 880. I've installed the mraa library as per the instructions provided in the repo. I have also loaded the gpio_f7188x kernal which is necessary for IEI Tank. But when I try to run the code:

import mraa
import time

# initialise gpio 23
gpio_1 = mraa.Gpio(23)

# initialise gpio 24
gpio_2 = mraa.Gpio(24)

# set gpio 23 to output
gpio_1.dir(mraa.DIR_OUT)

# set gpio 24 to output
gpio_2.dir(mraa.DIR_OUT)

# toggle both gpio's
while True:
    gpio_1.write(1)
    gpio_2.write(0)

    time.sleep(1)

    gpio_1.write(0)
    gpio_2.write(1)

    time.sleep(1) 

I get the error "Invalid GPIO pin". What is going wrong here?
I also tried different pin numbers from 0 to 8.

@bniedermayr
Copy link

Maybe a bit late. But what does the syslog print out?
sudo journalctl -e -f?

@frosst2906
Copy link

Hi,

I ran into the same issue and this is what my syslog has to say.

libmraa[7504]: Platform not supported, not initialising
libmraa[7504]: Checking additional Platform support for LEC-AL iPI
libmraa[7504]: gpio: platform doesn't support chardev, falling back to sysfs
libmraa[7504]: libmraa initialised for platform 'Unknown platform' of type 98
libmraa[7504]: gpio: init: pin 15 beyond platform pin count (0)
libmraa[7504]: gpio: init: pin 23 beyond platform pin count (0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants