raymate
Posts: 85
Joined: Sat Sep 28, 2013 3:56 pm
Location: Canada / UK
Contact: Website

Sense Hat Readings are Switched

Sun Mar 05, 2017 2:51 pm

Noticed that the temp reading from my sense hat is about 10 c more than it should, so I got a gadget to compare

After getting a little temp/humidty room gauge it looks like the sense hat is showing me the humidity when I ask it to show the temp.

Stand alone gadget I have for example says Temp: 21.5 Humidity: 31

The sense hat shows Temp: 30.8 Humidity: 21.2

To me this seems switched.

I did read online someone saying they noticed it switched but I can't find it now,

I just did a fresh download of Pixel on a new memcard and setup fresh same deal.

Also how do you change from C to F etc

Sorry if in wrong section, I can't see a dedicated sense hat section
__________________________________
Pi model B / Pi 2 / Pi 3 / Pi Zero W

User avatar
DougieLawson
Posts: 35381
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Sense Hat Readings are Switched

Sun Mar 05, 2017 2:56 pm

C to F is simple maths.

F = ((C / 5) * 9) + 32
C = ((F - 32) / 9) * 5
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11858
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Sense Hat Readings are Switched

Sun Mar 05, 2017 3:00 pm

moved to astro-pi.

raymate
Posts: 85
Joined: Sat Sep 28, 2013 3:56 pm
Location: Canada / UK
Contact: Website

Re: Sense Hat Readings are Switched

Sun Mar 05, 2017 3:05 pm

DougieLawson wrote:C to F is simple maths.

F = ((C / 5) * 9) + 32
C = ((F - 32) / 9) * 5

OK, so it's not a setting the sense hat outputs one format only.... got it :D

Any ideas my readings are switched ?
__________________________________
Pi model B / Pi 2 / Pi 3 / Pi Zero W

User avatar
DougieLawson
Posts: 35381
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Sense Hat Readings are Switched

Sun Mar 05, 2017 3:20 pm

Don't know, I don't have a SenseHAT. You should start by downloading the very latest software for it from https://pypi.python.org/pypi/sense-hat

Then work through the MagPi Issue #38 stuff https://www.raspberrypi.org/magpi/get-s ... sense-hat/

Then look at the examples here: https://github.com/bennuttall/sense-hat-examples
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

alphanumeric
Posts: 1837
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Sense Hat Readings are Switched

Sun Mar 05, 2017 8:51 pm

The latest Raspbian already has all the python code for it in it. The sense hat python library is included.
There is a temp/pressure sensor and a temp/humidity sensor. You can get the temp from either, I think it defaults to the humidity sensor. This is what I go by, https://pythonhosted.org/sense-hat/api/
Heat from the Pi's CPU can cause the temp to read high, especially if you have it laying flat. I have mine standing up, inverted so the GPIO header is arcos the bottom parallel to my desktop. Power jack pointing up at my ceiling. I also have a proto hat between my Pi and sense hat as a sort of heat shield and spacer. I have a RTC mounted to it. My temp readings now jive with my wall mounted thermostat.

raymate
Posts: 85
Joined: Sat Sep 28, 2013 3:56 pm
Location: Canada / UK
Contact: Website

Re: Sense Hat Readings are Switched

Mon Mar 06, 2017 12:59 am

Think you have hit the nail on the head, it's the Pi heating up the sensors.

Let my Pi cool down put on side ad the readings are more like what I thought they would be, just was surprised the humidity would be that sensitive I guess hotter air is dryer.

Anyhow even on the side after 10-15 mins the temps are up around 10c about the real room temp. So the sensors are super sensitive.

So Im ordering a 40 pin ribbon cable to get the hat away from the Pi.

alphanumeric wrote:The latest Raspbian already has all the python code for it in it. The sense hat python library is included.
There is a temp/pressure sensor and a temp/humidity sensor. You can get the temp from either, I think it defaults to the humidity sensor. This is what I go by, https://pythonhosted.org/sense-hat/api/
Heat from the Pi's CPU can cause the temp to read high, especially if you have it laying flat. I have mine standing up, inverted so the GPIO header is arcos the bottom parallel to my desktop. Power jack pointing up at my ceiling. I also have a proto hat between my Pi and sense hat as a sort of heat shield and spacer. I have a RTC mounted to it. My temp readings now jive with my wall mounted thermostat.
__________________________________
Pi model B / Pi 2 / Pi 3 / Pi Zero W

alphanumeric
Posts: 1837
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Sense Hat Readings are Switched

Mon Mar 06, 2017 11:00 am

Take your time and make sure you get Pin 1 connected to Pin 1 on both ends. And just having the red strip on the cable on the correct end of the GPIO header isn't a guarantee its correct by the way. You could still end up with Pin 1 on the cable connected to Pin 2 on the sense hat and Pin 2 to Pin 1 etc. A friend of mine got his wrong and permanently damaged his sense hat.
This is what I used, https://www.adafruit.com/products/2310 with this https://www.adafruit.com/products/1979 substituted for the header that comes with it. It made for a nice neat package all mounted with standoffs. I also wired up a Real Time Clock breakout board to it.

User avatar
davidcoton
Posts: 3807
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Sense Hat Readings are Switched

Mon Mar 06, 2017 9:44 pm

alphanumeric wrote:Take your time and make sure you get Pin 1 connected to Pin 1 on both ends.

Agreed absolutely.You can plug one end in backwards which is a Very Bad Thing.
alphanumeric wrote:And just having the red strip on the cable on the correct end of the GPIO header isn't a guarantee its correct by the way. You could still end up with Pin 1 on the cable connected to Pin 2 on the sense hat and Pin 2 to Pin 1 etc.
I don't think that is possible. Pin 1 comes to an IDC point nearer the end than pin 2, so must connect to the outside conductor on the ribbon cable. It doesn't matter which side of the plug or socket the cable comes, it always runs correctly. If you make your own cable, it is possible to connect wire 1 to pin 2, then 2 to 3 and so on, but it's difficult because the last wire wont fit properly.
Signature retired

alphanumeric
Posts: 1837
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Sense Hat Readings are Switched

Tue Mar 07, 2017 11:27 am

On the sense hat end, it is a female header. On the ribbon cable its female connectors. So how do you plug those two headers together? Double male header?. If you lay the sense hat down, LED matrix facing up (same for the PI GPIO header facing up) its
2 4 6
1 3 5
Flip it over though (looking at the back side) and its
1 3 5
2 4 6
If you connect the ribbon cable to the back side of the sense hat with a double male header I'm pretty sure pins 1 and 2 will be reversed? I would be checking it with an ohm meter before I applied power.

User avatar
davidcoton
Posts: 3807
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Sense Hat Readings are Switched

Tue Mar 07, 2017 10:11 pm

With a Pi0 and a male connector soldered to the wrong side of the board, it will break, because the pin pattern does not prevent it. Similarly a female header on the right side. But the cable mounting connectors, both male and female, will sort themselves out so that as long as the red stripe is the right end, it will connect to pin 1. Challenge: see if you can wire a cable (not a board) where the red stripe connects to pin 2.
Signature retired

alphanumeric
Posts: 1837
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Sense Hat Readings are Switched

Wed Mar 08, 2017 10:46 am


alphanumeric
Posts: 1837
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Sense Hat Readings are Switched

Wed Mar 08, 2017 11:04 am

This will work and let you use the existing header, https://www.adafruit.com/product/2339

Return to “Astro Pi”