24-01-2024, 17:05
I've just run into some problems with the GY-21 sensor - so beware of taking the code I gave above and using it elsewhere.
I haven't had chance to debug it yet, but the humidity sensor seems to be giving intermittent values, and the temperature sensor was fine until it suddenly started registering -126 degrees (that sounds like an overflow error, but I haven't had chance to investigate yet). Of course these could be partially broken electronics (I have no idea whether something I got from my former PhD supervisor might have been in his 'pile of broken things'), but I suspect I've screwed up the code somehow.
I'll get back to you once I've managed to have a proper look,
Robin
I haven't had chance to debug it yet, but the humidity sensor seems to be giving intermittent values, and the temperature sensor was fine until it suddenly started registering -126 degrees (that sounds like an overflow error, but I haven't had chance to investigate yet). Of course these could be partially broken electronics (I have no idea whether something I got from my former PhD supervisor might have been in his 'pile of broken things'), but I suspect I've screwed up the code somehow.
I'll get back to you once I've managed to have a proper look,
Robin

