Unable to read/write GPIO pins

Hello all,
I'm currently working on a project using upsquared board in which I'm trying to build a rover with four motors but before trying with motor driver I tried to check if gpio pins are working by glowing an LED, I tried to enable gpio pins using mraalib using these commands:
sudo add-apt-repository ppa:mraa/mraa
sudo apt-get update
sudo apt-get install libmraa2 libmraa-dev libmraa-java python-mraa python3-mraa node-mraa mraa-tools
following what's in this link: https://github.com/eclipse/mraa
but everytime I tried blinking the LED it threw this error:
File "/usr/lib/python3.8/dist-packages/mraa.py", line 392, in init
_mraa.Gpio_swiginit(self, _mraa.new_Gpio(pin, owner, raw))
ValueError: Invalid GPIO pin specified
no matter how many different pins I tried
So, I tried to rectify this error and found I have to update the kernel from generic to upsquared kernel as for this discussion: https://forum.up-community.org/discussion/4585/gpio-on-up%C2%B2
and when I updated the kernel and reboot the board to check whether the kernel was updated or not, it got stuck in bios settings over and over again everytime I reboot so I clean installed Ubuntu OS in the board once again and when I tried installing mraalib for gpio it says package not found and I don't know how to proceed, I don't think I should update the kernel because it may crash the system again

Do anybody know how to overcome this problem, any suggestions are welcome.

Thanks in advance.

Comments

Welcome!

It looks like you're new here. Sign in or register to get started.
Privacy Policy