ad0nd / pca9554 Goto Github PK
View Code? Open in Web Editor NEWPCA9554 8 bit I2C port expander arduino/esp library
License: GNU General Public License v3.0
PCA9554 8 bit I2C port expander arduino/esp library
License: GNU General Public License v3.0
Platform: Arduino IDE + ESP32 C3
I'm trying to run your library, I don't have any issues with writing to a pin of PCA9554, but reading does not work:
if(io.digitalRead(7))
{
io.digitalWrite(1, LOW);
}
else
{
io.digitalWrite(1, HIGH);
}
I'm getting an error:
C:\Users\Dell\AppData\Local\Temp\.arduinoIDE-unsaved2023102-21732-1iynypm.fdd6h\pca9554\pca9554.ino: In function 'void loop()':
C:\Users\Dell\AppData\Local\Temp\.arduinoIDE-unsaved2023102-21732-1iynypm.fdd6h\pca9554\pca9554.ino:46:22: error: cannot bind non-const lvalue reference of type 'byte&' {aka 'unsigned char&'} to an rvalue of type 'byte' {aka 'unsigned char'}
if(io.digitalRead(7)) io.digitalWrite(1, LOW);
^
In file included from C:\Users\Dell\AppData\Local\Temp\.arduinoIDE-unsaved2023102-21732-1iynypm.fdd6h\pca9554\pca9554.ino:12:
c:\Users\Dell\Documents\Arduino\libraries\PCA9554\src/PCA9554.h:41:8: note: initializing argument 1 of 'bool PCA9554::digitalRead(byte&)'
bool digitalRead(byte &pinNumber);
^~~~~~~~~~~
Using library PCA9554 at version 0.0.1 in folder: C:\Users\Dell\Documents\Arduino\libraries\PCA9554
Using library Wire at version 2.0.0 in folder: C:\Users\Dell\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire
exit status 1
Compilation error: cannot bind non-const lvalue reference of type 'byte&' {aka 'unsigned char&'} to an rvalue of type 'byte' {aka 'unsigned char'}
Thanks for your support.
The PCA9554 library is pretty solid for the Arduino consumers. It definitely works with not just the ESP32 architecture - but I've also tried it on the RP2040's. I can't see why it would be incompatible with any of the SAM or AVR architectures - since the library depends on the twowire library for the heavy lifting.
With the architecture=esp32 ---- the library shows up as incompatible for all but the esp32 devices.
I think it would be a great update to simply update the architecture property.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.