Hey, I'm new to electronics and microcontrollers.
I downloaded your ABE_Helper & IOPI from Github.
I'm using raspberry pi 3b+ with your IOPI Plus that has 16 channel relay switch connected to bus 1 and 16 channel relay switch connected to bus 2 they are both a low-level trigger.
What I want to do at the start of the application is to set the port direction to "input" because I want to modify the pin state, then I have to set port pullups to 0x00 so it will trigger the state, and then I just write 0xFF//0x00 to given port?
I wanted to test the logic and set half of the pins state to 0 and a half to 1..
private void OnBusConnected(object sender, EventArgs e)
{
var bus = (IOPi)sender;
//PORT A
bus.SetPortDirection(0, 0x00);
bus.SetPortPullups(0, 0x00);
bus.WritePort(0, 0xFF);
//PORT B
bus.SetPortDirection(1, 0x00);
bus.SetPortPullups(1, 0x00);
bus.WritePort(1, 0x00);
}
Is my logic correct? Because it does absolutely nothing. I tried to make it clear but please say if I have to clear something out.