Giter Site home page Giter Site logo

pca9554's People

Contributors

ad0nd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pca9554's Issues

digitalRead error: cannot bind non-const lvalue reference of type 'byte&' {aka 'unsigned char&'} to an rvalue of type 'byte' {aka 'unsigned char'}

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.

Please consider changing the architecture to "=*"

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.