Enviro Phat - Leds not working


All the sensors seem to work but annoyingly I cant turn on the leds.

Following tutorial

from enviophat import leds

It returns True but they are not on.

Something with the way I did the soldering perhaps or defective hat?

Appreciate some help.



Pinout is here, https://pinout.xyz/pinout/enviro_phat# It’s all done via i2c so I wouldn’t think its soldering? Unless its maybe one of the ground connections? Wouldn’t hurt to double check the pins used, especially all the ground pins.


Thanks. New to this so two questions.

  1. When you say don’t think soldering because i2c what does that mean?

  2. How do I go about checking ground connections?

Thanks again


LEDs are connected to BCM #4 which is a common pin for confusion since it’s the default for 1-Wire.

Launch Raspberry Pi Configuration or sudo raspi-config in Terminal and make sure 1-Wire is disabled, then reboot and try again.


Doh, I see LED’s listed on the pinout “now” for Pin 7. Don’t know how I missed it the first time.
I originally thought everything was done via i2c. But I goofed.
If what I thought had been true it would have been all or nothing. Either everything would work or none of it would work. But I missed that the LEDS were a separate pin.
Why I advised to check the ground connections is sometimes on pHats and Hats they aren’t all wired together. The grounds are all common and linked together on the Pi, but that not always the case for addon boards. The ProtoZero is like that. Unplug it from the Pi and some of the ground connections are left hanging.
Anyway it looks like Phil has you covered.


Thanks for advice. Turned out to be solder issue on pin 4. Lesson learnt!


So your good to go now, that’s nice to hear. Enjoy your new tech.=)


Thanks! If you dont mind me asking as I am guessing you have experience with this board. How did you deal with the temperature bias. I have seen an approach to work out a ratio based on cpu temperature but is there an acceptable hardware approach (case, separating the hat from the pi) that gives you accuracy to +/- 1c ?


I just made a post on this issue in another thread. I’ll copy it here and you can have a look see. I don’t have an enviro pHat. Two Sense Hats and a BME680.
From the other thread. BME680 two different results

I have two weather clocks, one indoor and one portable I take outside. I started out with just a Pi A+, DS3231 RTC and a Sense Hat. The Sense Hat has an issue where heat soak will throw the temperature readings off on the Sense hat. They read high. To offset or mitigate this I have a Proto Hat between my Pi and Sense Hat. It was also a convenient place to mount my DS3231. Anyway, putting that space and a bit of a barrier between my Pi and Sense Hat made the temperature readings accurate again. That weather clock sits in our living room running 24/7 with no case on it. I just put a black diffuser on the front. I have it flipped 180 so the GPIO header is on the bottom. It stands up better and leaves an open area at the top for heat to get out.
My second portable one started out the same way only I put it in a case with battery power. Even with the proto hat in between, temps read high due to heat build up in the case. It was vented, but only on the bottom and sides, and no fan. I don’t want rain or snow etc getting in. It is exposed to some precipitation at times.
I ended up mounting a BME680 externally on the bottom of my case. Mounted on the bottom with vented cover Its out of direct sunshine etc, so it reads pretty accurate.
There are all kinds of posts on this issue with the sense hat and all manner of formulas to compensate. I personally never went down that road. I’m not saying its a bad idea, just that I never tried it myself. I went with modifying my hardware setup first. Doing it with software was option B for me.
My build pictures are here if anybody is interested in a look see. https://1drv.ms/f/s!AjOYwiwlwDtpgq8_0VrdS3_H5xL_AA


Thanks for this! Same situation. I like the enviro pHat so want to persist with that. Was thinking a case, heatsink and then moving the hat away from the board using this:

That should get temperature closer to actual temperature I would hope!


That will work. I’ve used several of those in several of my Pi projects. I get the solder it yourself version so I can swap headers if need be. The fully assembled is a nice option if your not into soldering things yourself. It’s a lot of pins to solder too, 40 per header.
You’ll want a ventilated case. Holes to let hot air out and cool air in.
What are you using for a display to show the data etc? Just curious.


Cool will get one of those then and ventilated case.

This is for discretely monitoring conditions in our babies room. So planning on headless display where I can observe data in timeseries fashion and then look to add in alerts.

Looking at these options but open to other ideas:


That’s one thing I have never done, is send my data to the web. Or anywhere actually. I’ve always just displayed it locally on that Pi.
There was another thread where somebody got that part to work and they were doing the same as you, monitoring the babies room. BME680 though and a MicroDot pHat for a display. It looks like he used beebotte.

I don’t think he got his whole project working as he wanted though. He was, and maybe still is struggling with his display. Have a look at his thread. Maybe ask him some questions and or post a link to this thread in a post in his. ;)


nice, will do. Will post back when I get somewhere with this. Just question of finding some time (!)


Ain’t that the truth, lol. =)


Hello @jklondon (and thanks @alphanumeric). I have got my project working as I wanted, but just not with the time being displayed - this isn’t a major issue for me anyway.

I’m actually putting together a guide for the MagPi Magazine so it should be detailed in there soon.


Cool, I will look forward to reading it. Big thumbs Up. And thanks for posting here. =)


This is great and similar to what I want to do. The additional sensor I wanted to add was a microphone to capture sound but will save that for a phase 2!