ioBroker / AdapterRequests

This Place is used to track the status of new Adapter-Requests.
248 stars 36 forks source link

adapter for using gpio on tinkerboard like rpi2 #92

Closed smartboart closed 1 month ago

smartboart commented 5 years ago

Hello , i would like to use the gpio pins from my tinkerboard.. This is not possible with the rpi2 adapter.. anybody here who would like to modify the rpi2 adapter that it will work with the tinkerboard?

smartboart commented 5 years ago

Mybe it has something to do with the GPIO Adresslist ( gpio readall ) I think that the adapter rpi2 reads the Table BCM Adresses, which are named CPU in Tinker board table... The CPU Adresses are totally different to the BCM Adresse... Is it possible to change this somewhere in the rpi2 code to make it work for tinkerboard?

raintonr commented 3 years ago

It has been discussed that the RPI2 adapter could be forked, removing the RPi specific stuff and creating a generic SBC GPIO adapter. I am happy to do this, but...

... what this would need is a generic NodeJS module that can identify how many GPIO pins are available, etc. on each different board and allow them to be controlled. Using sysfs looks promising (see https://www.kernel.org/doc/Documentation/gpio/sysfs.txt). It's hard to believe a generic SBC GPIO module doesn't already exist though... needs a little more searching before re-inventing the wheel. Seems there are already a few GPIO modules that rely on sysfs so all good. Ah, with the exception of the DHT sensor support I added in RPI2 - that will need more thought but for regular GPIO buttons and relays should be easy enough.

FWIW, sysfs reports 54 GPIO pins available on RPi as that is the actual number available on the BCM SoC but of course not all of these are physically available. For this reason the settings screen for any such generic GPIO adapter would likely need a + button to add GPIO number with options (input, output, pull up/down, etc) for that specific number in preference to a long list of available GPIO numbers, many of which would likely not be usable.

mcm1957 commented 1 month ago

see tinker adapter

repo: https://github.com/simatec/ioBroker.tinker

raintonr commented 1 month ago

I still believe it would be more efficient to have a generic SBC GPIO adapter rather than trying to maintain a plethora of adapters that all do pretty much the same thing.

mcm1957 commented 1 month ago

As this issue requests support for tinker board, an adapter for tinkerborad exist and hhe issue is ruther pld we can close here.

Please open a new issue if you encounter a problem or like to suggest a new feature at the adapter repository.

@taintor If nobissue for a genericxadapter exist feel free to create one - or write this adaPter if you have sparetume