Posts: 17
Threads: 7
Likes Received: 1 in 1 posts
Likes Given: 0
Joined: Dec 2018
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
•
Posts: 985
Threads: 22
Likes Received: 68 in 60 posts
Likes Given: 12
Joined: Jul 2018
12-29-2018, 12:59 AM
(This post was last modified: 12-29-2018, 01:00 AM by Im4Tinker. Edited 1 time in total.)
You should describe how you issue the command.E.G.
Code:
$ sudo python example.py
Perhaps it's necessary to promote yourself as administrator
Light blue words might be a link. Have you try to click on them?
•
Posts: 17
Threads: 7
Likes Received: 1 in 1 posts
Likes Given: 0
Joined: Dec 2018
(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
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.
•
Posts: 985
Threads: 22
Likes Received: 68 in 60 posts
Likes Given: 12
Joined: Jul 2018
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?
•
Posts: 17
Threads: 7
Likes Received: 1 in 1 posts
Likes Given: 0
Joined: Dec 2018
(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
•
Posts: 985
Threads: 22
Likes Received: 68 in 60 posts
Likes Given: 12
Joined: Jul 2018
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
Light blue words might be a link. Have you try to click on them?
•