Stránka 1 z 1

I2C expandér PCF8574

Napsal: 19 srp 2018, 07:53
od Le-Ze
Poradí někdo jak na to?
https://github.com/skywodd/pcf8574_ardu ... /PCF8574.h
/**
* Read the state of all pins in one go
*
* @return The current value of all pins (1 bit = 1 pin, '1' = HIGH, '0' = LOW)
*/
uint8_t read();
Když takto jeden byte value = expander.digitalRead(0);

Re: I2C expandér PCF8574

Napsal: 19 srp 2018, 12:34
od tomasp
Na uvedeném githubu je i adresář s příkladem https://github.com/skywodd/pcf8574_ardu ... nBlink.ino, kde se píše
This demo code demonstrate all functionnalities of the PCF8574 library.
.
A ke konci příkladu je řádka

Kód: Vybrat vše

Serial.println(expander.read(), DEC); // Read the whole pins input register
Tom

Re: I2C expandér PCF8574

Napsal: 19 srp 2018, 13:19
od Le-Ze
Tak ten přiklad je i ve stažene knihovně a ja na něj čučel :lol:
Hold slepejš :D
String x = String(expander.read(), DEC);