We wanted to share that Bela recently added a getting started guide for connecting Daisy Seed to their Trill Touch Sensors!
We are excited to see the kinds of implementations individuals will create with this great pairing, and are honored to be recognized by a great open-source platform.
This runs the mostly unmodified Trill Linux library. The only relevant changes are in the I2c.h file, where I interface with dasiy::I2CHandle. This is very similar to what I did for Gliss on the STM23G4A1KEU6, although in that case I was using the STM32 HAL directly.
Instead of hardcoding bus and pins like other I2C-based libraries in src/dev/, I am providing a minimum of flexibility, so the user can pick one of I2C busses 1 or 4, and I am guessing the default pins here. I would be happy to add more busses but I am not sure what (if any) default pins you recommned there. Btw, this (automatically mapping default pins to busses) seems like a feature that should be provided by I2CHandle.
Anyhow, all of this builds but is untested as I don’t have a Daisy. It would be great if you could test it and let me know the outcome.
Hello, it’s great to hear from you!
Thank you so much for doing this. My Trill Bars are currently in one of my moving boxes, so I can’t test it immediately, but I will certainly do so after the move.
The libDaisy support will certainly open up more possibilities.
ok thanks, maybe @dreamer can give it a try in the meantime? Also, where’s the best place to get at least a formal review of the code? Is it too early to open a PR?
Maybe I can have a look this weekend, but strapped on time these days.
Would need to make a pure libDaisy patch as adding a PD integration on top would be a bit much right now. (especially if implementations might change)
It would probably be good to cross-reference how current I2C peripherals are handled to make sure that the same conventions are used (I quickly glanced over the diff, but don’t know enough about things to comment).
I’d say after a quick test of the functionality opening a PR would be good. The sooner you can get some review/feedback the better you can keep momentum.
I’m not sure what that means, but just in case you didn’t notice I added an example here, so for now I think it’s just a matter of running that example and see if it works!
the fact that it just hangs is suspicious. Can you add some print statements in the Trill::setup() method in src/dev/trill/Trill.cpp and in the various initI2C_RW(), readBytes(), writeBytes() of src/dev/trill/I2c.h to try and pinpoint the issue?