This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Permission to use GPIO
#1
Hi everyone,

I have connected some motor to my tinker board (to be more specific a motor controller) and wanted to run this script: [LINK](https://github.com/pololu/drv8835-motor-...835_rpi.py)

It requires wiringpi in order to work and I have installed that. The problem is that whenever I try to run the example above, I get this error:
wiringPiSetup: mmap (GPIO) failed: Operation not permitted
Reply
#2
You should describe how you issue the command.E.G.
Code:
$ sudo python example.py
Perhaps it's necessary to promote yourself as administrator
Code:
$ sudo su
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#3
(12-29-2018, 12:59 AM)Im4Tinker Wrote: You should describe how you issue the command.E.G.
Code:
$ sudo python example.py
Perhaps it's necessary to promote yourself as administrator
Code:
$ sudo su

I did both, under root (using su command) and under sudo. Does not work.
Some people suggest to use iomem=relaxed but no one bothered to state where exactly to paste this command.
Reply
#4
It might give more descriptions if you'll report the exact output when you run the command. For instance the full python traceback.
Furthermore, have you noted that pigpio is needed ?
The iomem=relaxed is mentioned here. So we should see if that is set on the TB.
Code:
$ zcat /proc/config.gz |grep DEVMEM=y

One more option is to add iomem=relaxed to the kernel command line
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#5
(12-30-2018, 01:13 AM)Im4Tinker Wrote: It might give more descriptions if you'll report the exact output when you run the command. For instance the full python traceback.
Furthermore, have you noted that pigpio is needed ?
The iomem=relaxed is mentioned here. So we should see if that is set on the TB.
Code:
$ zcat /proc/config.gz |grep DEVMEM=y

One more option is to add iomem=relaxed to the kernel command line

Where exactly should I add iomem=relaxed?
Shall I follow this link?
https://askubuntu.com/questions/19486/ho...-parameter
Reply
#6
I don't know exactly which OS you've installed on you TB. All is about to append a new parameter to the kernel command line.

Assuming that you installed linaro or Elar System, then it's a way to edit the /boot/extlinux/extlinux.conf and modify the append line.

In the case that you've installed Armbian/Archlinux it will take to modify /boot/boot.cmd and execute the command to remake the boot.scr (which is explained within the boot.cmd itself)
The modification should be to append the above message on the bootargs variable. The easier way is to write within the quote the additional parameter.

In all the cases, you might verify whether the command is taken by
Code:
$ cat /proc/cmdline
Light blue words might be a link. Have you try to click on them? Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)