Raspberry Pi and SenseHat problems


My SenseHat was working I copied a few small programs (scrolling messages across etc) that worked perfectly.I took the Sense Hat off to play with other Python programs , reconnected it and suddenly the sense hat is “not detected” and I keep getting the following message:-Traceback (most recent call last):
File “/home/pi/MagPiSenseHat/message astronaut.py”, line 2, in
File “/usr/lib/python3/dist-packages/sense_hat/sense_hat.py”, line 39, in init
raise OSError(‘Cannot detect %s device’ % self.SENSE_HAT_FB_NAME)
OSError: Cannot detect RPi-Sense FB device

I have tried “sudo apt-get update” & “sudo apt-get upgrade” but same result… have I fried something. The original rainbow ligths are still on but nothing else.


the Sense HAT’s EEPROM sets up a framebuffer device at start up for the Matrix, so if you restarted the Pi since you had it working then you need to shut down the Pi and boot again.

… but, yes, in theory, I guess unplugging and plugging the Sense HAT ‘live’ could damage it. It is certainly good practice to avoid live plugging hardware (even though I rarely heed my own advice).


Thank you for replying. Do you know of anything to find out how bad things are or anything I can do to make things better - some kind of reset???perhaps


the question is:

  1. does it work after a fresh reboot?

if not,

  1. do you have another HAT hooked up to the Pi at the same time?

the later would stop the OS loading the required drivers and otherwise set up the Sense HAT. If that step occurs then the Matrix should return to not being lit a few seconds after the boot process has started.

If not then my best guess would be that the EEPROM is damaged, or disconnected - note that you need physical pins 27-28 connected if you are using select wiring as opposed to attached directly to the Pi*.

-* well technically you could dispense of it if you know what is required to get this working manually but that would be fairly involved.


no it is just the same ( I’ve turned everything off and on several times now . full rainbow lights but nothing working!!! seems a bit complicated for me. 've tried the Blinkt that came with my pi and that doesn’t come on at all. Hope I haven’t damaged too much. I’ve just worked through all the GPIO pins trying a simple blinking program the only pin not working was 18. . Thanks for your help. Hope the Pi is aright and I’ll pehaps get myself another SenseHat sometime


if you confirmed no GPIO are damaged then there is no reason Blinkt wouldn’t work - are you sure you are plugging it in the right way? the rounded edge needs to be on the outside edge of the Pi.

what Pi is this on incidentally, and can you post a picture of your soldering if this is a Zero / Zero W?


I see however that bcm24 - physical pin 18 is used by both the blinkt and - technically speaking - the Sense HAT. Is this the one you mean or are you referring to bcm18 (tip: always specify otherwise the info can be misinterpreted).

When you say it does not work, how have you assessed the matter? Have you added anything to your /boot/config.txt file, post the content here if unsure as there might lie the issue.


thanks again for trying to help. by pin 18 I mean the GPIO pin with 18 alongside ( 6th pin down from the top on the outside row.)

To test I used some code which I know to work to light and blink a led . I started off with the 5v pin and then worked my way round each pin in turn altering the code for each pin. I haven’t amended the /boot/config.txt file as far as I know.

# For more options and information see
# http://rpf.io/configtxtreadme
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border

# uncomment to force a console size. By default it will be display's size minus
# overscan.

# uncomment if hdmi display is not detected and composite is being output

# uncomment to force a specific HDMI mode (this will force VGA)

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes


# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display


# uncomment for composite PAL

#uncomment to overclock the arm. 700 MHz is the default.

# Uncomment some or all of these to enable the optional hardware interfaces

# Uncomment this to enable the lirc-rpi module

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)

# NOOBS Auto-generated Settings:

Can you see anything in there?