Anybody knows what are the changes regarding WIFI?
Now back to our PCF8574 story.
Below you can find a very simple example for testing and using the PCF8574 P0-P7 pins as output.
This is how is looking the hardware setup, ESP8266 nEXTEvo G2 Board + AN-1 extension board (it has also a full PCF8574 I/O expander port, what we needed for our test):
Because couldn't find how to change the SDA/SCL pins I was forced to use the ESPBasic default allocated I2C pins, GPIO0 and GPIO2. Looks ugly, I know. I hope in the future it will be possible to choose your desired I2C pins as you wish and need:)
The software:
let address=32 'PCF8574 I2C Address
button "1", [1]
button "2", [2]
button "3", [3]
button "4", [4]
button "5", [5]
button "6", [6]
button "7", [7]
button "8", [8]
button "OFF", [9]
wait
[9]
i2c.begin(address)
i2c.write(255)
i2c.end()
wait
[1]
i2c.begin(address)
i2c.write(254)
i2c.end()
wait
[2]
i2c.begin(address)
i2c.write(253)
i2c.end()
wait
[3]
i2c.begin(address)
i2c.write(251)
i2c.end()
wait
[4]
i2c.begin(address)
i2c.write(247)
i2c.end()
wait
[5]
i2c.begin(address)
i2c.write(239)
i2c.end()
wait
[6]
i2c.begin(address)
i2c.write(223)
i2c.end()
wait
[7]
i2c.begin(address)
i2c.write(191)
i2c.end()
wait
[8]
i2c.begin(address)
i2c.write(127)
i2c.end()
wait
The Web interface:
Functional description: by pressing the "1"->"8" buttons you can activate the corresponding P0-P8 PCF8574 output pins. "OFF" = all off.
Please read carefully PCF8574 related articles and documents. SINK and SOURCE are not the same thing. Connect the LEDs for SINKING current!
And yes, was tested. Working OK. With LED's. Enjoy.
PS: they are some errors in the web console, maybe somebody want to take a look at.
Available on Tindie: https://www.tindie.com/products/nEXT_EVO1/universal-ac-mains-dimmer-mpdmv41/