January 28, 2018 at 11:10 #1424
I’d like to access the GPIO pins from within python.
Can I use the standard gpio package for the pi on the Voltastream or does it need to be adapted.
On a side note I already tried accessing the GPIO pins by command line commands but I couldn’t get any results.
Basically what I want is to control one or more relays connected to the gpio pins and a rotary encoder (to control volume).
I already created the python code for my raspberry pi’s and now I’d like to port it for the Voltastream but I get a bit lost in the documentation about the gpio pins/naming.
MarcelJanuary 28, 2018 at 11:48 #1426
first thing you’d need to do is to modify the kernel device-tree to add new GPIO’s.
Except for I2C everything on the GPIO connector isn’t enabled by default.
If there would be a proper way of integrating local volume control with a rotary encoder, I would already ship everything configured for that.
The problem is that all integrated streaming clients have only one-way volume control. That means if you change it locally the remote source won’t be notified of this. Next time you change the volume from remote it will jump back to the previous level. Unfortunately I can’t do anything about this as it’s a limitation of several streaming-client open-source projects.
Nevertheless if you’d like to continue, install a VM and set it up for cross-compiling. Clone the voltastream kernel and add the GPIO’s you’d like to use to the imx6ull-voltastream0.dts file. Compile just the device-tree files and copy the new imx6ull-voltastream0.dtb over to your SD card.
Alternatively I can prepare that for you and ship a new DT for the scenario with the next kernel update. How many GPIO’s do you need?
All the best,
Philip.January 29, 2018 at 02:34 #1431
The rotary encoder stuff is something I already have working on other boards.
In case of hardware volume control I change volume with alsamixer, otherwise I just talk to the api of my music software (Roon).
I can confirm that this method also works with the Voltastream (tested on the command line).
It would be great if the gpio pins are accessible just like with the Pi, i2c would also be really great if you want to hook up an LCD.January 31, 2018 at 12:09 #1432
Is it also possible to just create a devicetree overlay to enable the gpio pins ?
In that case, it might even be possible to compile the dts file to dtbo from the commandline opn the Voltastream itself.
I just need access to the common GPIO pins, comparable to how this is setup with raspberry Pi’s and Orangepi’s and such.
If you can get me the devicetree overlay to enable the hardware, I can create ports of the python libraries for gpio access.
If you don’t have time to create the overlay / device-tree, can you please write down a few steps how I can do it myself on a VM or from the commandline ?February 2, 2018 at 15:48 #1445
Any quick hints for me how to proceed with adjusting the devicetree file ?
I’m looking at that dts file right now looks a lot like abacadabra to me 🙂
I just like to add a few gpio pins so I can toggle a relay or read a button (or rotary encoder). Being able to enable internal pullup would be great but not really needed.
I can adjust the python gpio library myself but first I need to be able to address the pins.
Looking at the devicetree file, it appears that pins 0 – 4 are already defined, is that correct ? If so, which pins on the gpio connector are those ?February 4, 2018 at 18:48 #1446
sorry for the delay.
No, with the current dt there are no general GPIO’s defined.
Just tell me which pins on the GPIO header you’d like to use. Then I’ll add it to the device-tree and push out an update.
All the best,
Philip.March 5, 2018 at 21:38 #1571
I just need 4 pins, do not care much which ones.
For example, physical pins 11, 13, 15 and 19 ?
Would be really great if you can provide the device-tree update. The board is now sitting useless on my desk because I can’t use it with spdif (as you know) and the other project I want to use it in has some buttons I need to wire.
MarcelMarch 13, 2018 at 23:02 #1575
yes, will include some GPIO’s next time when I’m working on the kernel.
Will keep you posted.
Philip.March 19, 2018 at 17:02 #1576
Great, really waiting for it.April 2, 2018 at 14:05 #1579
any news yet ?May 6, 2018 at 11:32 #1665
I saw you updated PolyOS. Any chance this includes the gpio access ?
You must be logged in to reply to this topic.