Raspberry pi 3 : sample python snap to read data gpio pins

Note that RPi.GPIO attempts to use /dev/gpiomem (which is covered by the gpio-memory-control interface), but falls back to /dev/mem (which is covered by the phyiscal-memory-control interface). You can use the latter while waiting for the former.

Please format your code, it’s very difficult to read (you can surround your code with three backticks, ```).

However, it looks like you’re wanting to use sysfs, in which case you should read this post. tl;dr: Individual interfaces for GPIO pins don’t exist on the stable rpi images, you need to use the edge image instead.