Agreed, I2C seems like an afterthought while SMBus look like the real deal.
Anyway, after a bit of struggle I figured it all out.
I ended up creating wrappers to provide classes that are can drop-in replaced for Micropython's machine.I2C and machine.Pin.
They work fine for my purpose (the clock generator is a Si5351A and the DAC is the one integrated in the MA1070P which is a class-D amplifier).
Still they are not polished enough to be released.
I believe that a more comprehensive effort to port Micropython's machine classes to "big" Python could be a plus for the RPi community. Python really provides a low entry barrier that encourages tinkering with stuff.
I myself find it useful for prototyping and hacking together quick & dirty proof of concept.
Anyway, after a bit of struggle I figured it all out.
I ended up creating wrappers to provide classes that are can drop-in replaced for Micropython's machine.I2C and machine.Pin.
They work fine for my purpose (the clock generator is a Si5351A and the DAC is the one integrated in the MA1070P which is a class-D amplifier).
Still they are not polished enough to be released.
I believe that a more comprehensive effort to port Micropython's machine classes to "big" Python could be a plus for the RPi community. Python really provides a low entry barrier that encourages tinkering with stuff.
I myself find it useful for prototyping and hacking together quick & dirty proof of concept.
Statistics: Posted by morci — Thu Apr 10, 2025 8:41 pm