geotek
Posts: 15
Joined: Wed Mar 27, 2013 2:57 pm

Sense-Hat Problems

Mon Feb 29, 2016 12:49 am

-Hat Issues
I have been trying to get my Sense-a Hat working for few weeks with poor results.
I have a Raspberrypi 2 + with new Jessie software.
I have followed instructions from raspberrypi.org, Adafruit and Pimoroni.
Each group has different instructions, no of which seem to work
I'am sure the instructions for wheezy is different from Jessie. Many set ups do not mention which version of software Os is being used. Jessie does not require some of the upgrades and special instructions. Some instructions mention that the configuration.txt must be modified and other instructions do not. If the Sense Hat is to be encouraged for young students, the instructions must be more complete and easy to understand. There is just too much confusion in setting up the SenseHat
Tom

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5118
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Sense-Hat Problems

Mon Feb 29, 2016 2:43 am

geotek wrote:If the Sense Hat is to be encouraged for young students, the instructions must be more complete and easy to understand.
Agreed. That HAT should work out of the box on the full jessie image. If it doesn't, it might be a problem with the hardware, in which case you should get it replaced.

'THE' documentation for it can be found here https://github.com/raspberrypi/document ... /sense-hat .

geotek
Posts: 15
Joined: Wed Mar 27, 2013 2:57 pm

Re: Sense-Hat Problems

Mon Feb 29, 2016 3:16 pm

Re SenseHat Difficulties

Do I understand correctly - The Jessie version of OS already contains Sense-Hat software?
I also understand that you do not need to install Upgrade and Pillow, is this correct?
When you Raspi-Config and choose I2C does this enable i2c tools automatically, as I have seen instructions to manually install, if so why?
What specifically do I need to install for Jessie version to get SenseHAt working.
Someone needs to make a chart for Wheezy installs Jessie installs. Is this possible or are there too many quirks within the systems? Too much differing instructions between different people,groups and companies
I just ordered a new SenseHat to see if my current SenseHAt is defective.
Tom

geotek
Posts: 15
Joined: Wed Mar 27, 2013 2:57 pm

Re: Sense-Hat Problems

Mon Feb 29, 2016 6:55 pm

Greetings:

I came across a post mentioning timing issues with SenseHat and Jessie OS
Is this a real problem? How is it solved?
Tom

User avatar
TideMan
Posts: 203
Joined: Fri Jun 22, 2012 8:08 am
Location: ChCh, NZ

Re: Sense-Hat Problems

Mon Feb 29, 2016 10:57 pm

geotek wrote:Re SenseHat Difficulties

Do I understand correctly - The Jessie version of OS already contains Sense-Hat software?
Not as far as I know.
My notes (from Oct 2015) say that I did:

Code: Select all

sudo apt-get update
sudo apt-get install sense-hat
sudo pip-3.2 install pillow
and it's been working perfectly on Jessie ever since.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5118
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Sense-Hat Problems

Mon Feb 29, 2016 11:05 pm

There are no timing issues that I am aware of, no.
geotek wrote:The Jessie version of OS already contains Sense-Hat software?
Yes
geotek wrote:I also understand that you do not need to install Upgrade and Pillow, is this correct?
Correct, it's already installed.
geotek wrote:When you Raspi-Config and choose I2C does this enable i2c tools automatically, as I have seen instructions to manually install, if so why?
i2c-tools is not needed for i2c to work, they're just debugging tools. So no, they are not installed when i2c is enabled. I haven't seen any instructions saying you need to install that for the sense hat. You also don't need to enable i2c, unless you've manually disabled it before.
geotek wrote:What specifically do I need to install for Jessie version to get SenseHAt working.
'sudo apt-get install sense-hat', but that's already taken care of.
geotek wrote:Someone needs to make a chart for Wheezy installs Jessie installs.
Wheezy is no longer supported by us.
geotek wrote:Is this possible or are there too many quirks within the systems?
There were some quirks when adding sense hat support into wheezy. That was mostly related to the packaging of the python library and python3 support. That partially accounts for some of the differences in instructions you see. Some people tell you to install pillow from pip because it does no real harm on jessie and is required on wheezy to get python3 support.
geotek wrote:I just ordered a new SenseHat to see if my current SenseHAt is defective.
An easy test to see if it's defective in the way I think it's defective is to add 'dtoverlay=rpi-sense' to config.txt, reboot and see if that at least adds a /dev/fb1.
TideMan wrote:My notes (from Oct 2015) say that I did
sense-hat should already be installed and you don't need to install pillow from pip (as explained above)

piguyang
Posts: 3
Joined: Mon May 30, 2016 3:55 am

Re: Sense-Hat Problems

Mon May 30, 2016 4:11 am

I have noticed with the different versions of jessie and how you configure the astro pi buttons there is problems. With newer kernels I cannot get them to work, with 2-25-2016 kernel I can. That would be with the button config from "github.com/raspberrypilearning/astro-pi-guide/raw/master/inputs-outputs/dtb/astropi-keys.dtb --no-check-certificate" config the config.txt to add it, reboot then you download pygame_test.py. and run it. With the earlier versions I have no problems. With the newest I cannot get it to work. i2c is enabled. I have compared the config.txts.... I am lost. I would like if I could use the most up to date versions. I have a pi zero, pi B2 and piB3 that I have shuffled the cards around with and they all work with my earlier Jessie kernel from feb 25 2016. Everything else works well with the sense hat as far as python samples, but not when I configure the 6 buttons for the astro-pi. Any suggestions?

DirkS
Posts: 8110
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Sense-Hat Problems

Mon May 30, 2016 9:52 am

piguyang wrote:Any suggestions?
Try renaming astropi-keys.dtb to astropi-keys.dtbo
If that doesn't work then post the output of

Code: Select all

sudo vcdbg log msg
(the last 20 lines or so should be sufficient)

goranj
Posts: 4
Joined: Thu Jun 09, 2016 9:00 am

Re: Sense-Hat Problems

Thu Jun 09, 2016 9:16 am

Hi guys,

I have quite a big problem. After I purchase BlackHat, I connect sense hat upside down, I accidentally turned the 40pin ribon cable on wrong side - just for a second!!

Now, the RGB lights are "working", staying always ON, but RPI does not recognize SenseHat :(.

Have I destroyed senseHat, and perhaps even some GPIO pins on RPI?!

I would really appreciate any help! :(

This is error:
raise OSError('Cannot detect %s device' % self.SENSE_HAT_FB_NAME)
OSError: Cannot detect RPi-Sense FB device

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5118
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Sense-Hat Problems

Thu Jun 09, 2016 4:31 pm

goranj wrote:Hi guys,

I have quite a big problem. After I purchase BlackHat, I connect sense hat upside down, I accidentally turned the 40pin ribon cable on wrong side - just for a second!!

Now, the RGB lights are "working", staying always ON, but RPI does not recognize SenseHat :(.

Have I destroyed senseHat, and perhaps even some GPIO pins on RPI?!

I would really appreciate any help! :(

This is error:
raise OSError('Cannot detect %s device' % self.SENSE_HAT_FB_NAME)
OSError: Cannot detect RPi-Sense FB device
Any luck if you add 'dtoverlay=rpi-sense' to config.txt?

goranj
Posts: 4
Joined: Thu Jun 09, 2016 9:00 am

Re: Sense-Hat Problems

Thu Jun 09, 2016 5:30 pm

@ShiftPlusOne

I have made few preliminary tests after adding dtoverlay=rpi-sense and it is working!!! :D

I really can believe this is happening! :) (I was sure sensehat was destroyed!)


Can you plase explain me what "dtoverlay=rpi-sense" means, and is there are any limitations now after adding this?!

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5118
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Sense-Hat Problems

Thu Jun 09, 2016 5:46 pm

goranj wrote:@ShiftPlusOne

I have made few preliminary tests after adding dtoverlay=rpi-sense and it is working!!! :D

I really can believe this is happening! :) (I was sure sensehat was destroyed!)


Can you plase explain me what "dtoverlay=rpi-sense" means, and is there are any limitations now after adding this?!
The hat has a chip containing information the kernel uses to figure out what's attached. Adding that line to config.txt loads the information which should be loaded from that chip. I haven't looked at the schematic to determine how it might have fried, but it seems like something in that general area has been damaged.

goranj
Posts: 4
Joined: Thu Jun 09, 2016 9:00 am

Re: Sense-Hat Problems

Thu Jun 09, 2016 7:13 pm

Ok, so I did destroy it! :/ In some way!

I have made new tests and all sensors seams to be working - all OK, except this registration problem - but I guess I could live with that, without buying new senseHat.

I guess there is no way to fix this, on so small components - soldered on the surface of the board?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5118
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Sense-Hat Problems

Fri Jun 10, 2016 1:04 am

goranj wrote:Ok, so I did destroy it! :/ In some way!

I have made new tests and all sensors seams to be working - all OK, except this registration problem - but I guess I could live with that, without buying new senseHat.

I guess there is no way to fix this, on so small components - soldered on the surface of the board?
Depends on your equipment and level of experience. You'd need to figure out what actually happened, what's fried, replace it. If the eeprom chip itself is fried, you'd need to re-program it with the right data. More hassle than it's worth.

goranj
Posts: 4
Joined: Thu Jun 09, 2016 9:00 am

Re: Sense-Hat Problems

Fri Jun 10, 2016 12:23 pm

I will probably order new!

This one is working for now, and I have purchase SenseHat so I can practice Python (to have some visible output, active sensor data as input)...

Thanks again for help! :)

User avatar
M5
Posts: 10
Joined: Tue Mar 27, 2012 2:35 pm
Contact: Website

Re: Sense-Hat Problems

Mon Jan 23, 2017 2:58 pm

Hello All
I just wanted to say a BIG Thank you.


[quote="goranj"]Hi guys,

I have quite a big problem. After I purchase BlackHat, I connect sense hat upside down, I accidentally turned the 40pin ribon cable on wrong side - just for a second!!

Now, the RGB lights are "working", staying always ON, but RPI does not recognize SenseHat :(.

I had the same type of problem where I had (I really don't know how) pluged the sence hat on to the GPIO pins off set by one (Yes! should have gone to specsavers!).

But after reading the post from ShiftPlusOne that said to try adding 'dtoverlay=rpi-sense' to config.txt
Bingo It's working

Thank you

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

Re: Sense-Hat Problems

Wed Jan 25, 2017 12:47 pm

This info has helped me get going with my sense hat in Python, https://pythonhosted.org/sense-hat/api/ and of course, https://www.raspberrypi.org/learning/ge ... worksheet/

User avatar
bensimmo
Posts: 2917
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Sense-Hat Problems

Mon Feb 20, 2017 1:23 pm

Having used one since they came out, my advice is stick to the RaspberryPi website and the SenseHat API for information, ignore everyone else.
RaspberryPi keep their information up to date given they make it.

Also you can also use the sense hat emulation which is built into recent Raspian, certainly if you have the newer Pixel desktop.
You will probably see that used in a few of the SenseHat projects.

A good project to work through is the Datalogging the SenseHat, it uses pretty much every part of it.


If you have updated from earlier Jessie setups, then you may need to manually install a few bits.
For the emu
https://www.raspberrypi.org/blog/deskto ... -emulator/
https://sense-emu.readthedocs.io/en/v1.0/

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

Re: Sense-Hat Problems

Fri Feb 24, 2017 9:25 pm

One issue with the joystick (5 position switch) is in earlier versions of Raspbian you had to use evdev etc to make it work. Now it works natively in python. If your following and old tutorial that may be why your switch/joystick doesn't work. Evdev and pygame had to be installed separately from the command line. I had to redo my python file for my weather clock once the new native python support for the joystick was added.

aherbjornsen
Posts: 5
Joined: Tue Aug 09, 2016 9:35 am

Re: Sense-Hat Problems

Wed Mar 01, 2017 1:14 pm

I just started to test a Sense Hat on a Pi 3.

I'm using a freshly installed Raspbian (2017-01-11) and see that sense-hat and python stuff is preinstalled, but I cannot get the RGB display to work using python.

I've tried to compile and run the example 'snake' game (which is a C application) and it works perfectly. The display and joystick both work fine.

Running any of the python example scripts will just generate random gibberish on the display.

I've tested reading the sensors (temperature, pressure and humidity) from a python script and that is working just fine, it's just controlling the RGB display that does not work.

Any suggestions?

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

Re: Sense-Hat Problems

Wed Mar 01, 2017 1:22 pm

I have a file here you can try if you want, https://1drv.ms/f/s!AjOYwiwlwDtpgq8_0VrdS3_H5xL_AA Run it from python 3 / idle 3 to get the best results. It should show you a scrolling message with date, time, temp, humidity, pressure. It will be upside down though, I have my sense hat flipped 180 for cooling. My GPIO runs across the bottom. The color of the text is dependant on the measured conditions.

aherbjornsen
Posts: 5
Joined: Tue Aug 09, 2016 9:35 am

Re: Sense-Hat Problems

Wed Mar 01, 2017 6:32 pm

Thanks, but when I try to run your script I get this error:

Code: Select all

[email protected]:~ $ sudo python3 THP.py 
Traceback (most recent call last):
  File "THP.py", line 7, in <module>
    sense.set_imu_config(False, False, False)
  File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 660, in set_imu_config
    self._init_imu()  # Ensure imu is initialised
  File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 648, in _init_imu
    raise OSError('IMU Init Failed')
OSError: IMU Init Failed

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

Re: Sense-Hat Problems

Wed Mar 01, 2017 6:54 pm

Ok, that's weird? I don't get that error. You can remove or remark out this line and that error should go away.

Code: Select all

sense.set_imu_config(False, False, False)

It's not needed for what is used by my code. As far as I know, all it does is turn off the •Gyroscope •Accelerometer •Magnetometer.
https://pythonhosted.org/sense-hat/api/
Sorry about that. I'm running that file on two sense hats with no error massages.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5118
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Sense-Hat Problems

Wed Mar 01, 2017 6:57 pm

aherbjornsen wrote:I just started to test a Sense Hat on a Pi 3.

I'm using a freshly installed Raspbian (2017-01-11) and see that sense-hat and python stuff is preinstalled, but I cannot get the RGB display to work using python.

I've tried to compile and run the example 'snake' game (which is a C application) and it works perfectly. The display and joystick both work fine.

Running any of the python example scripts will just generate random gibberish on the display.

I've tested reading the sensors (temperature, pressure and humidity) from a python script and that is working just fine, it's just controlling the RGB display that does not work.

Any suggestions?
Did you run rpi-update? I was checking this and mine was working fine until I updated the kernel to 4.9. What does 'uname -a' say?

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

Re: Sense-Hat Problems

Wed Mar 01, 2017 7:06 pm

Both of my Pi's/sense hats are running Jessie Pixel as far as I know. On one I did a sudo apt-get update, sudo apt-get upgrade and some things started acting weird. My sense hat code still worked. I just had other issues. It would boot to the Desktop GUI even though I set it to command line for one thng. That prompted me to leave my other Pi as is. One is an A+ (256 meg of RAM) and a newer A+ (512meg RAM).

Return to “Astro Pi”

Who is online

Users browsing this forum: No registered users and 1 guest