Skip to main content
7 events
when toggle format what by license comment
Oct 12, 2016 at 16:08 comment added Janka In that case, I remembered incorrectly. Sorry.
Oct 12, 2016 at 14:40 comment added joan I can only say that is incorrect so many times. Run pigpio. Switch GPIO high or low with pigpio. It does not care if a GPIO is exported by sysfs or not. The errors shown in the question are because those GPIO are not connected to the expansion header on the Pi model being used by the questioner.
Oct 12, 2016 at 14:23 comment added Janka I was referring to the problem the OP has: errors when accessing GPIOs. To my understanding, all these interfaces you mentioned only work for the GPIOs which are exported to userspace. And you can check if they are through listing /sys/class/gpio. Even when you don't want to use the sysfs interface for your actual program. It's just to check for the source of the problem.
Oct 12, 2016 at 13:56 comment added joan I don't dispute that the sysfs interface to the GPIO exists. I am just pointing out that most Pi GPIO libraries do not use it. Most libraries map the GPIO register space into user memory using /dev/mem or /dev/gpiomem and program the GPIO registers directly. E.g. my pigpio, wiringPi, bcm2835, RPi.GPIO etc. etc.
Oct 12, 2016 at 13:20 comment added Janka @joan: I had to double-check it but IIRC the export mechanism exposed in /sys/class/gpio not only affects /sys/class/gpio itself, but general exposing to userspace.
Oct 12, 2016 at 13:16 comment added joan That is not true. Most Pi GPIO libraries talk directly to the GPIO for performance reasons and no use is made of /sys/class/gpio. The sysfs GPIO interface is comparatively slow.
Oct 12, 2016 at 12:40 history answered Janka CC BY-SA 3.0