Hi!
As I told above the pin 1 of DB25 is connected to P12 from PCF8575.
Maybe with this image stay more clear.
You need follow the logic used on topic quoted above.
Using names of variables available on Ferduino I'll give an example.
Only to keep the code organized.
Cut:
const byte aquecedorPin = 42;
Paste after:
///**************** PCF8575 **********************************
Change:
const byte aquecedorPin = 42;
To an number following the order of free pins.
I'll use 0 (Zero) So.
const byte aquecedorPin = 0;
On setup coment this line:
pinMode(aquecedorPin, OUTPUT);
This function sets all pins from PCF8575 as OUTPUT, so the line above is useless.
if(PCF8575TS_S == true)
{
PCF8575.begin(endereco_PCF8575TS); // Inicia a comunicação com o PCF8575TS
for(int i = 0; i < 16; i++)
{
PCF8575.pinMode(i, OUTPUT);
delay(100);
PCF8575.digitalWrite(i, LOW);
}
}
In the tab "parametros" find all:
digitalWrite(aquecedorPin
Replace all with:
PCF8575.digitalWrite(aquecedorPin
This is the main difference between use a pin from Atmega and PCF8575.
So if you want control something connected to PCF8575 just add :
Before:
On this case I'm using the P0 from PCF8575 BUT this pin is available on pin 13 of DB25.
Let me know if is more clear now.
Best regards.