PIGPIO won't run on UP board
Fahim Al Hasnaeen
New Member Posts: 4 ✭
I need PIGPIO to capture an input frequency from a TCS3200 color sensor
I tried installing PIGPIO in UP running ubilinux. It installed but wont run,
When I try running it with sudo PIGPIOD
I get "initPerpherals: mmap gpio failed (Operation not permitted) Can't initialise pigpio library
Can anyone please help me?
I tried installing PIGPIO in UP running ubilinux. It installed but wont run,
When I try running it with sudo PIGPIOD
I get "initPerpherals: mmap gpio failed (Operation not permitted) Can't initialise pigpio library
Can anyone please help me?
Comments
-
Unfortunately, PIGPIO is not currently supported on the UP board. Much of the core of the PIGPIO library is implemented with code that is specific to the Broadcom SoC in the Raspberry Pi, as it is directly accessing the registers on the SoC for functions such as GPIO and SPI (for performance reasons). For that reason, it is not directly portable to other platforms such as the UP board, although much of the surrounding components (e.g. the pigpio daemon, library bindings, etc.) could probably be re-used with little or no modification if that core code was adapted to support the UP board (volunteers welcome!!).
The core pigpio code I'm referring to can be found here:
https://github.com/joan2937/pigpio/blob/master/pigpio.c
This type of sensor may not be the best choice for using with the UP board, due to the need for high-speed GPIO. A sensor connected over a bus such as I2C or SPI might be a better choice. For example:
https://www.adafruit.com/product/1334
https://www.seeedstudio.com/item_detail.html?p_id=854
One of the light sensors supported by the kernel IIO drivers may also be useful:
http://lxr.free-electrons.com/source/drivers/iio/light/?v=4.4