I'm trying to connect a TCA9555 (to get more digital ins) to Bela via I2C. AS there is no Bela library for that board, can I use the Adafruit_TSC2007-Linux-master as basis and change the TSC2007 code to the TCA9555 from the arduino library. Would that make any sense?
TCA9555 as IO expander on the Bela
- Edited
I'll have a look tomorrow
Here's some wrapping code that makes it run (no changes to the library itself), it includes an example. Note that any access to this GPIO bank will need to happen from outside the render()
thread.
Thanks a lot (what would I do without your advice). As soon, as I get my TCA board, I'll give it a try. Looks straightforward to me.
In principle you can get all those extra files I added there and many/most I2C Arduino libraries should work.
Again, thanks a lot.I got my TCA9555 boards today and your library works like a charm. First I got the address wrong (was 0x27, should be 0x20 - because I grounded all address bits). I used DO 0 to test the input. The board itself has LEDs for each input, which light up, when the signal is 0: very nice.