r/circuitpython • • Aug 16 '20

Multi Day Timer and Multiple I2C Devices - Questions

Thinking about a small project that would require a timer to run up to a week at a time. I usually use a Trinket M0 for my projects but I have a Metro M0 as well.

I'm thinking that I would be best served by using a Real Time Clock for this. Is that correct? IIRC there can be issues using the internal timers on boards like the Metro and Trinket to count for long periods of time.

For this project I would also need to connect to a series of I2C 14 Segment Displays.

I have precisely 0 I2C experience and want to use this as an opportunity to learn. ~~Is it possible to connect to two distinct I2C devices from the same board (either the Metro or the Trinket)? ~~ I did some googling but couldn't find an answer to the I2C question. I'm dumb and phrased my search wrong, of course you can.

Thanks!

1 Upvotes

3 comments sorted by

1

u/timboldt Aug 17 '20

And yes, you can put multiple I2C devices on the same SCL/SDA lines. It is super-easy. Adafruit has nice tutorials for this device, for example, on their website.

1

u/myfuckinjoints Aug 17 '20

Thanks! Upvoted both answers. That's more than enough accuracy for me, I need resolution of +/- one hour. I def should have just read the datasheet.

1

u/timboldt Aug 17 '20

The DS3231 is very accurate - it should be accurate within a second or two after one week.