SenseHAT and Black Hat Hack3r


#1

I have the senseHAT for my pi weather station, but due to the temperature readings being too high, I decided to buy the Pimoroni Black Hat Hack3r, This arrived earlier and now I am not sure how to connect the senseHat up to the Black hat hack3r.

I have the Pi clear case and there is just a nice slot on the side where the 40pin row is and I first assumed that the ribbon cable went through the slot. But after I saw some pictures of how the cable was connected or routed, turned it around, so now it goes over the top of the pi board.

I have the cable plugged into the outside row of pins, where there are 2 rows of 40 pins, so now which row of pins do I plug the sens Hat into.
I did try plugging into row which are all marked up but the sensehat was not initialized, so I shutdown the pi and unplugged the sensehat.

Edit:
After seeing a picture of how to plug in the sensehat and on what set of pins to use, I have got the sense HAT working, but now the temperatures are about 50% down on what they are by a thermometer reading.

This is the code for the temperature measurment:
t1 = sense.get_temperature_from_humidity ()
t2 = sense.get_temperature_from_pressure
t = (t1 -t2) /2
t_cpu = get_cpu_temp()
t_corr = t - ((t_cpu -t ) / 1.5)
t_corr = get_smooth(t-corr)
return t_corr

As the Sensehat is no longer over the cpu, some of the code above could be removed or not used, but what and how.


#2

Mini or full sized? Pictures of the hookup here, https://shop.pimoroni.com/products/mini-black-hat-hack3r for the mini.
The big thing is to make sure PIN 1 on the Pi’s GPIO is plugged into PIN 1 on the hack3r board. PIN 1 on the Pi GPIO has a square solder pad. Put the white strip side of the ribbon cable there, then also put the white strip on the PIN 1 side of the 40 PIN header on the hack3r board. The three headers are wired PIN for PIN. All the PIN 1’s are connected together, and all the PIN 2’s etc. IT doesn’t really matter which header you connect the ribbon cable to. Just as long as PIN 1 is connected to PIN 1 on the Pi. I hope that makes sense.


#3

All you need is
t = sense.get_temperature()


#4

Thanks for the clarification, and I have connected the ribbon cable to the outside row of pins, and the sensehat to the adjacent row.

At least I have it working ok now.

The code I left working is:
t1 = sense.get_temperature_from_humidity ()
t2 = sense.get_temperature_from_pressure
t = (t1 -t2) /2

Then hashed the rest of it out:
#t_corr = t - ((t_cpu -t ) / 1.5)
#t_corr = get_smooth(t-corr)
#return t_corr

Here I put:
return t

This give the more or less same indoor temperature as another station, and it’s uploaded to wunderground ILEEDS52

Thanks


#5

I have two sense hats setup as weather clocks. They show date, time , temp, humidity and pressure in a continuously scrolling message on the LED matrix. I put a proto hat between the Pi and the sense hat.


I just used a stacking header instead of the one that came with it. It also gave me a place to wire up a RTC. That Pi isn’t in a case and the temp reads OK.
My second one is a battery powered portable setup in a case. Even with vent holes in the case, and the proto hat, the temps read high. I had a BMP180 temperature sensor breakout board left over from another project and used it for the temperature readings. It’s mounted outside the case. Temps read nice and accurate now.