Programming the Pine64 - Printable Version

+- PINE64 (
+-- Forum: PINE A64(+) (
+--- Forum: General Discussion on PINE A64(+) (
+--- Thread: Programming the Pine64 (/showthread.php?tid=778)

Programming the Pine64 - cookeys - 04-26-2016

Hi, I would like to know how I can programming my Pine64 ; I explain :
For example I would like to turn on led connected to my Pine64 ( on GPIO port I guess ) when it's 10pm.
How I can do that and in general how I can create instructions to execute for him ?


Have a nice day


RE: Programming the Pine64 - MegaMech - 04-28-2016

I don't have an answer. But maybe trying looking at how a raspberry Pi turns on LED's. That might give you an idea of how it works.

RE: Programming the Pine64 - martinayotte - 04-29-2016

You can use Python pyA20 from, but you will need to fix it a bit to make it 64bits compatible.

The fix is in gpio_lib.h, changing a "int" (32bits) with a "long" (64bits) :

< extern unsigned int SUNXI_PIO_BASE;
> extern unsigned long SUNXI_PIO_BASE;

And also in the gpio_lib.c :

< SUNXI_PIO_BASE = (unsigned int) pc;
> SUNXI_PIO_BASE = (unsigned long) pc;