Possible to use code write for raspberry pi on VIM3(using GPIO)?

Hi there, since my intended project for VIM3 get blocked by missing gpu driver, I plan to play with vim3 for a led strip controller project. However it seems most led controller libraries are made for raspberry pi’s GPIO layout, which is different from VIM (like this one: https://github.com/jgarff/rpi_ws281x). So just want to know how hard will it be to convert such libraries to be compatible to VIM GPIO layout?

Thanks

How do you intend on connecting the LEDs
by some serial interace like SPI or I2C or general GPIO

i think it should be able to be done in a couple of minutes,
just change the GPIO numbers wherever present and it should technically work

Hi is there any update to use the general GPIO using python in VIM3? are there any python code example?

Hello, Is anything here helpful…
https://docs.khadas.com/vim3/HowToUseWiringPi.html
https://docs.khadas.com/vim3/HowToUseWiringPi-Python.html
https://docs.khadas.com/vim3/HowToUseRPiGPIO.html

1 Like

Yes i have tried “How To Use RPi.GPIO” but no luck, the GPIO won’t go HIGH. Maybe i have mistaken in the numbering of the GPIO…
i am using the BCM mode, and with the example it is shown number 15, and where should i connected it to?

I regret I have not tried this myself and can offer no advice.
I assume you have seen this.

please note that it only works in images with 4.9 kernel… I presume you understand that…

have you tried,
gpio readall

it will provide the necessary GPIO mapping you need…

Yes it is on 4.9 kernel, and i have tried with gpio readall, and the GPIO section shows number of 426… but when i tried with RPi.GPIO library it is still not working and even the number is not acceptable as the library says.

Do you have any example that i can follow?

there is one example by user:birty
but it is for I2C usage…