PINE64

Full Version: Programming the Pine64
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 ?

Thanks

Have a nice day


Cookeys
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.
You can use Python pyA20 from https://pypi.python.org/pypi/pyA20, 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) :

123c123
< extern unsigned int SUNXI_PIO_BASE;
---
> extern unsigned long SUNXI_PIO_BASE;

And also in the gpio_lib.c :

67c67
< SUNXI_PIO_BASE = (unsigned int) pc;
---
> SUNXI_PIO_BASE = (unsigned long) pc;