Valueerror invalid gpio pin specified

tutorial
96boards

#1

i have tried to run the command
p=mraa.Gpio(24)
the error that is displayed says
ValueError: Invalid GPIO pin specified.

Please tell me what I must do. I am a complete newbie to embedded systems.


#2

Hello,

Please provide the following info for nailing down the issue:

  1. Linaro debian release version
  2. Mraa version

If you are using latest debian and latest Mraa, then there might be some issues with Chardev support in gpio for Mraa. I will submit a patch in next few days for fixing that.

Thanks,
Mani


#3

Thank you for the quick reply.
My Debian version is 9.4 and the mraa version is 1.9.0
So I guess both are latest versions. Could you please tell me when and form where must I install the new mraa version.
Thanks
Rahul


#4

HI Mani,
Has the update been made?


#5

Hi @rahulpelluri,

Sorry for the delay. Can you please post the log from mraa?

It can be obtained by the following command:

$ tail -n 100 /var/log/syslog

-Mani


#6

Mar 30 14:02:02 linaro-alip libmraa[2373]: libmraa version v1.9.0 initialised by user ‘linaro’ with EUID 1000
Mar 30 14:02:02 linaro-alip libmraa[2373]: imraa: Failed to open lock file
Mar 30 14:02:02 linaro-alip libmraa[2373]: libmraa initialised for platform ‘DB410C’ of type 9


#7

Mar 30 14:02:02 linaro-alip libmraa[2373]: libmraa version v1.9.0 initialised by user ‘linaro’ with EUID 1000

Mar 30 14:02:02 linaro-alip libmraa[2373]: imraa: Failed to open lock file

Mar 30 14:02:02 linaro-alip libmraa[2373]: libmraa initialised for platform ‘DB410C’ of type 9


#8

Looks like there is no issue with Chardev implementation. Can you please try to build and install mraa from source? Instructions can be found in the below guide:

Then try to run some sample examples:

Thanks,
Mani


#9

Hi Mani,
I have tried what you have asked me to. It didnt work. I have even reinstalled the operating system and have tried again. I am not even able to access the GPIO pins from the command line. What could be the issue. There was a pre installed mraa package in the OS and it also did not work on the python commands.