more G-Labs products

Author Topic: Cubieboard 2 - A20  (Read 1134 times)

July 13, 2015, 01:00:48 AM
Read 1134 times

[email protected]

  • *
  • Information
  • Newbie
  • Posts: 3
How to GPIO work in HG installed on Cubieboard2-A20?

July 13, 2015, 11:41:37 AM
Reply #1

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
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.


July 31, 2015, 04:16:29 PM
Reply #2

[email protected]

  • *
  • Information
  • Newbie
  • Posts: 3
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) });

August 05, 2015, 09:59:15 PM
Reply #3

[email protected]

  • *
  • Information
  • Newbie
  • Posts: 3
Where is declared CB3_CN8Pin05?