Closed masteriii closed 5 years ago
Hi masteriii, I need more information to help you. I work without problem on nodemcu. Bye Renzo
ESP8266 CH340G NodeMcu V3 https://bit.ly/2JLrZTt
Hi, this library is for pcf8574 not 8575. Bye
https://github.com/xreef/PCF8575_library
I write a first release of a library for PCF8575, if you want try use the link upper. Bye
I try to test on nodemcu v3 but not working.. /* Blink led on PIN0 by Mischianti Renzo http://www.mischianti.org
https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/ */
include "Arduino.h"
include "PCF8574.h"
// Set i2c address PCF8574 pcf8574(0x20);
void setup() { Serial.begin(115200);
pcf8574.pinMode(P1, OUTPUT); pcf8574.pinMode(P2, OUTPUT); pcf8574.pinMode(P3, OUTPUT); pcf8574.pinMode(P4, OUTPUT); pcf8574.pinMode(P5, OUTPUT); pcf8574.pinMode(P6, OUTPUT); pcf8574.pinMode(P7, OUTPUT); pcf8574.begin(); }
void loop() { int i;
pcf8574.digitalWrite(P1, HIGH); pcf8574.digitalWrite(P2, HIGH); pcf8574.digitalWrite(P3, HIGH); pcf8574.digitalWrite(P4, HIGH); pcf8574.digitalWrite(P5, HIGH); pcf8574.digitalWrite(P6, HIGH); pcf8574.digitalWrite(P7, HIGH);
pcf8574.digitalWrite(P0, LOW); pcf8574.digitalWrite(P1, LOW); pcf8574.digitalWrite(P2, LOW); pcf8574.digitalWrite(P3, LOW); pcf8574.digitalWrite(P4, LOW); pcf8574.digitalWrite(P5, LOW); pcf8574.digitalWrite(P6, LOW); pcf8574.digitalWrite(P7, LOW);
}