At last a project that went smoothly for a change. The MAX1238 chips arrived, and I soldered them to the PCBs and they seem to be working just fine at first sight. I was a bit worried about the chips being too small when I saw them, but they are fine.
I wrote a very simple MicroPython library to handle this shield:
class MAX123x:
def __init__(self, i2c, address=0x35):
self.i2c = i2c
self.address = address
self.reset()
def reset(self):
self.i2c.writeto(self.address, b'\x80')
def read(self, channel):
if not 0 <= channel <= 11:
raise ValueError()
data = self.i2c.readfrom_mem(self.address, 0x61 | (channel << 1), 2)
return ((data[0] & 0x0f) << 8) | data[1]
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
"a project that went smoothly".... i think you are writing fiction now... "Shirely" you are joking.....
(nice work btw...)
Are you sure? yes | no
Well, I'm sure there are problems that I'm not seeing that will manifest themselves down the road at some point, of course. I did it too many times already to really believe I got everything right at the first try. And of course preparing this for the semi-mass production required for Tindie is going to take some more work. But so far so good.
Thank you for your kind words.
Are you sure? yes | no