Micro Dot pHAT to display clock and BME280 sensor data

Yeah, I’ve looked at that anyway. The def clock() code is based on one I found over at this GitHub repo.

I’m not fussed about getting the readings individually as they are working fine as they are too.

I used the example that Matt at RaspberryPiSpy made here: Using the BME280 I2C Temperature and Pressure Sensor in Python - Raspberry Pi Spy (the actual code is here).

Ah, I found that PiSpy link yesterday. My sample code above was loosely (very loosely ;) ) based on it. Did you get your BME280 from Adafruit by chance? That’s where I got my BMP180. They have all kinds of Arduino code but they leave you hanging Python / Pi wise. You have to go hunt it up, or code it up yourself.
No so here, at least with the BME680. All the python code is there for that.
If it was me, I think I’d concentrate on getting a working clock and go from there. Just the clock all by itself. The Pimoroni code is what I would use. Once you get it working with no outside influences you should be able to figure out what might be breaking it? It might be an interaction with some of the other code?

No, I bought it off eBay - just some generic BME280 (think it’s called GY-BME280) which is basically the same but not extortionately priced because it’s from Adafruit.

And that is why Pimoroni are awesome - if I wasn’t using the BME680 in another room, I’d have used that instead…

Yep, that’s what I’m going to try. It’s mainly so that when my wife (or myself, but usually my wife) is feeding our 5 month old son in the middle of the night, we know what time it is without the burning retina inducing brightness of an iPhone screen waking up our son… The subtle green light from the Micro Dot pHAT is quite pleasant.

Would still appreciate any assistance @gadgetoid or anybody else might be able to offer though…

Phil must be really busy or on vacation or something? He’s usually pretty quick replying when I do an @gadgetoid

The weather clock sense hat I have in the living room I have setup so I can dim the display (low light mode) with the sense hat joystick. It also has a ninja diffusor on it. I leave it on 24/7 and dim it at night.
My portable weather clock does it all automatically with readings taken from the Si1145. In bright light it goes full bright with all white text. I have trouble reading Red or Blue text in bright sunlight. Even with the diffuser on it. In normal light it stays full bright but goes back to colored text. In dim or dark conditions the display dims so its easy on the eyes.
I take it to our dog park to keep an eye on how hot or cold it is. I also take it out on my deck under my gazebo in the summer. It’s in a weather proof case with no access to the sense hat joystick so I wanted it all done automatically. It gets rained on and snowed on at times lol. The case has vent holes but strategically placed so moister can’t easily get in.
Anyway, good luck with your coding. =)

The Raspberry Pi Foundation Forum has a dedicated Python section, https://www.raspberrypi.org/forums/viewforum.php?f=32
I’m also a member there, same username I use here.

1 Like