HomeGenie Forum
General Category => General Discussion => Topic started by: [email protected] on July 13, 2015, 01:00:48 AM
-
How to GPIO work in HG installed on Cubieboard2-A20?
-
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.
-
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) });
-
Where is declared CB3_CN8Pin05?