More I2C

A project log for AirQualSniff

amateur air quality sniffer and atmospheric science widget

jon-kunkeeJon Kunkee 11/29/2023 at 04:340 Comments

One of my peripherals doesn't play nice on I2C. I finally just put everything on their own I2C hub ports, then started only enabling one at a time. It's cumbersome, but I haven't had a cessation in telemetry in over a week!

(It's entirely possible that the I2C was fine, but there were too many pullup resistors on the network. I'm not going to check that until the next rebuild, at which point I may do a little work to isolate the fault. It would be easy enough to enable groups of devices together until the issue repros, which could rule out pullup resistors.)

Previously I had been stressing that there was a bug in my timekeeping and scheduling code. Nope, just angry I2C. Funny how we debug the thing that's easy to debug because it's so hard to debug the thing that's actually probably broken. I think the screen flashes also went away, but I'm not certain. (Something about a drunk guy searching under a street lamp for his keys because there's light there, even though he lost his keys somewhere else...)

This means my custom integer class can probably go. I'll have to double-check that integer overflow works as expected with the Particle 2.x.x series GCC, then I can clean it out.

Progress on this project is mostly on GitHub now that the hardware is mostly stable. (I say mostly because I bought some upgrades for it, but they'll require a case redesign that's due anyways because of temperature accuracy issues.)