Hi,
Few weeks ago I installed HG on my RPi as a Z-wave gateway. I realized that GPIO can be of great use for adding more switches with relays, and I bought 8 port relay module, and it works great with 100 GPIO Modules.
Now, I consider it so great, that I miss GPIO ports. I found that P5 Header on RPi have 4 more GPIO ports, but it requires some work on soldering. So, I did it, and by default, I can't use it with 100 GPIO Moudules, and I made following changes in the code:
var pinMapping = new List<dynamic>();
// read GPIO configuration
var gpio4 = Program.InputField("GPIO4").Value.ToLower();
var gpio17 = Program.InputField("GPIO17").Value.ToLower();
var gpio18 = Program.InputField("GPIO18").Value.ToLower();
var gpio21 = Program.InputField("GPIO21").Value.ToLower();
var gpio22 = Program.InputField("GPIO22").Value.ToLower();
var gpio23 = Program.InputField("GPIO23").Value.ToLower();
var gpio24 = Program.InputField("GPIO24").Value.ToLower();
var gpio25 = Program.InputField("GPIO25").Value.ToLower();
var gpio28 = Program.InputField("GPIO28").Value.ToLower();
var gpio29 = Program.InputField("GPIO29").Value.ToLower();
var gpio30 = Program.InputField("GPIO30").Value.ToLower();
var gpio31 = Program.InputField("GPIO31").Value.ToLower();
// add configured GPIOs to a list that will be used to configure the connection
if (gpio4 != "off") pinMapping.Add(new { Config = gpio4, Address = "GPIO4", Pin = ConnectorPin.P1Pin7, Direction = ( gpio4.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio4.StartsWith("!") });
if (gpio17 != "off") pinMapping.Add(new { Config = gpio17, Address = "GPIO17", Pin = ConnectorPin.P1Pin11, Direction = (gpio17.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio17.StartsWith("!") });
if (gpio18 != "off") pinMapping.Add(new { Config = gpio18, Address = "GPIO18", Pin = ConnectorPin.P1Pin12, Direction = (gpio18.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio18.StartsWith("!") });
if (gpio21 != "off") pinMapping.Add(new { Config = gpio21, Address = "GPIO21", Pin = ConnectorPin.P1Pin13, Direction = (gpio21.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio21.StartsWith("!") });
if (gpio22 != "off") pinMapping.Add(new { Config = gpio22, Address = "GPIO22", Pin = ConnectorPin.P1Pin15, Direction = (gpio22.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio22.StartsWith("!") });
if (gpio23 != "off") pinMapping.Add(new { Config = gpio23, Address = "GPIO23", Pin = ConnectorPin.P1Pin16, Direction = (gpio23.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio23.StartsWith("!") });
if (gpio24 != "off") pinMapping.Add(new { Config = gpio24, Address = "GPIO24", Pin = ConnectorPin.P1Pin18, Direction = (gpio24.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio24.StartsWith("!") });
if (gpio25 != "off") pinMapping.Add(new { Config = gpio25, Address = "GPIO25", Pin = ConnectorPin.P1Pin22, Direction = (gpio25.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio25.StartsWith("!") });
if (gpio28 != "off") pinMapping.Add(new { Config = gpio28, Address = "GPIO28", Pin = ConnectorPin.P5Pin3, Direction = (gpio28.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio28.StartsWith("!") });
//if (gpio29 != "off") pinMapping.Add(new { Config = gpio23, Address = "GPIO29", Pin = ConnectorPin.P5Pin4, Direction = (gpio29.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio29.StartsWith("!") });
//if (gpio30 != "off") pinMapping.Add(new { Config = gpio24, Address = "GPIO30", Pin = ConnectorPin.P5Pin5, Direction = (gpio30.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio30.StartsWith("!") });
//if (gpio31 != "off") pinMapping.Add(new { Config = gpio25, Address = "GPIO31", Pin = ConnectorPin.P5Pin6, Direction = (gpio31.EndsWith("out") ? PinDirection.Output : PinDirection.Input), Reversed = gpio31.StartsWith("!") });
When I try to complie it, I get following error:
Connector pin P5-3 is not mapped to processor with pin layout revision 1
And, my expertise stops here. Any help ideas?