PINE64

Full Version: Attaching a physical button to the ROCK64
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I have downloaded the package that allows Python and GPIO interaction: https://github.com/mrfixit2001/Rock64-R64.GPIO

I have a button wired to the Ground pin and the pin 18 (https://www.cnx-software.com/wp-content/uploads/2017/08/Rock64-Pi-2-Bus-Pinout.png)
[/url]
so it looks like I am getting errors with my [url=https://pastebin.com/QpP1wgKH]script
(https://pastebin.com/QpP1wgKH).
errors appear after I ctrl-c in terminal, the two errors are:
Error: Unable to get GPIO value
You must setup() the GPIO channel (BCM 18) first

does anyone know what I am doing wrong?
take a look at this repo. it's a clone with some changes.
https://github.com/Matei-Ciobotaru/Rock64-R64.GPIO


another thing is you could use GPIO.BOARD instead of GPIO.BCM and maybe for test use value 18 instead of button.