06-20-2016, 09:15 PM
(This post was last modified: 06-20-2016, 11:23 PM by MarkHaysHarris777.)
(06-20-2016, 01:41 PM)martinayotte Wrote: The logic is in the RPi.GPIO-PineA64-master/source/common.c file, but of course PL7 isn't there, although it could be added later.
For now, I would go with the sysfs, where GPIOs can be exported, set direction, and then state value.
The pin number would be for PL7 is ("L"-"A")*32+7 = 359 ... I've verified on real hardware and it is working.
echo 359 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio359/direction
echo 0 > /sys/class/gpio/gpio359/value
@martinayotte, thanks much... I was in the process of studying the codes for RPi.GPIO/ you saved me a ton of work figuring out the 'number' from name, bank, pin &c. I did have to make the change above to include the /gpio folder under /class (I assume it was just a typo... I tried this on the debian image, have not tried it on the ubuntu image yet-- see above). Again, thanks it was a big help !
@longsleep, thanks for the formula script to go from name -> pin number ! voila, wishes do come true !
I should note (even though its probably obvious) the LED lights on value = 0; because we're providing the ground shot for DCDC1.
I won't be soldering my test LED in; going to use a smaller (3mm) green LED coming soon.
edit: here's the final 3mm green: