Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Wire.h>
- //---------------------------
- void setup()
- {
- Wire.begin(2,0); // ESP8266
- //Wire.begin(); // Arduino
- }
- //---------------------------
- void loop()
- { // Se PCF8574A mude 38 para 20
- Wire.beginTransmission(0x38); // Begin the transmission to PCF8574
- Wire.write(0); // Zera as portas
- Wire.endTransmission(); // End the Transmission
- delay(1000); // Delay 1 seg
- Wire.beginTransmission(0x38); // Begin the transmission to PCF8574
- Wire.write(0xFF); // Liga todas portas
- Wire.endTransmission(); // End the Transmission
- delay(1000); // Delay 1 seg
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement