HomeGenie Forum

General Category => General Discussion => Topic started by: [email protected] on July 13, 2015, 01:00:48 AM

Title: Cubieboard 2 - A20
Post by: [email protected] on July 13, 2015, 01:00:48 AM
How to GPIO work in HG installed on Cubieboard2-A20?
Title: Re: Cubieboard 2 - A20
Post by: dani on July 13, 2015, 11:41:37 AM
Perhaps you can look at the source code of the program CubieTruck/GPIO Modules for adapt if necessay.
As is write in the comment it is designed for :
CubieTruck/CubieBoard3 GPIOs mapped to HG modules.
Each GPIO can be configured as input (IN), output (OUT) or can be disabled (OFF).
GPIOs configured as IN are mapped to a Sensor module with a Status.Level field displaying current pin level (0, 1).
GPIOs configured as OUT are mapped to a Switch module that can be controlled with on/off commands.

Title: Re: Cubieboard 2 - A20
Post by: [email protected] on July 31, 2015, 04:16:29 PM
Can I change this line???

if (pc19 != "off") pinMapping.Add(new { Config = pc19, Address = "PC19", Pin = ConnectorPin.CB3_CN8Pin05, Direction = (pc19 == "out" ? PinDirection.Output : PinDirection.Input) });

to

if (pd4 != "off") pinMapping.Add(new { Config = pd4, Address = "PD4", Pin = ConnectorPin.CB2_U14Pin05, Direction = (pd4 == "out" ? PinDirection.Output : PinDirection.Input) });
Title: Re: Cubieboard 2 - A20
Post by: [email protected] on August 05, 2015, 09:59:15 PM
Where is declared CB3_CN8Pin05?