OpenSprinkler Forums Hardware Questions OpenSprinkler OS 3.0 Lan Adapter Reply To: OS 3.0 Lan Adapter




if you had the same “problem” that i have. find the section below in opensprinkler.cpp
you have to add ~ in the pca9555 section so it will look like this reg = (reg&0xFF00) | ~station_bits[0]; // output channels are the low 8-bit

// Handle driver board (on main controller)
if(drio->type==IOEXP_TYPE_8574) {
/* revision 0 uses PCF8574 with active low logic, so all bits must be flipped */
drio->i2c_write(NXP_OUTPUT_REG, ~station_bits[0]);
} else if(drio->type==IOEXP_TYPE_9555) {
/* revision 1 uses PCA9555 with active high logic */
uint16_t reg = drio->i2c_read(NXP_OUTPUT_REG); // read current output reg value
reg = (reg&0xFF00) | station_bits[0]; // output channels are the low 8-bit
drio->i2c_write(NXP_OUTPUT_REG, reg); // write value to register