All me electrical equipment is connected to 2 PCF8574's breakoutboards.
I have 1 PCF8574 (0x21) build in me exo-terra dual top and me TL lamp is connected to P0 and the halogen lamp is connected to P1.
the other PCF8574 (0x22) is used to control heater1, heater2, fogger.
Now i want to control in an easy way me electronic devices.
I use the sainsmart 2 relay module to switch the 220V but found out that the relay module sinks 50 mA and the maximum PCF8574 output current is 25mA.
So 1ste PCF8574 is blow up. I will mod the 2 relay module so the current is limited to 20 mA (changing R1 and R4)
I used A2 and A3 as digital outputs A2 high (+5V) and A3 low (GND) to deliver the 5V to the I2C boards and de relay module but the current was to high. .
Now I'm using an external 12V to 5V power regulator connected to Vin
Below you can found me test code that i already have
The Timelord lib will be used to calculated the sunrise and sunset time
the Time and TimeAlarms lib will be used to schedule timed actions (recalculate everyday the sunset/rise time turn on/off the light and set max temp and humidity
...