1

I'm trying to attach a Sense HAT to a Rpi3 B+ via a 40pin M2F GPIO ribbon cable and I'm having trouble getting the Rpi to recognize the Sense HAT.

In order to get the RPi configured correctly, I've run the following commands:

  • sudo rpi-update
  • sudo apt-get install sense-hat
  • sudo apt-get install -y python-smbus
  • sudo apt-get install -y i2c-tools

I enabled ic2 in raspi-config. That should mean that I2C is installed and running and device-tree is enabled, right?

But I've got a python script that fails. When it runs this code:

from sense_hat import SenseHat
import time
import sys

sense = SenseHat()

then it raises this error:

sense = SenseHat()
File "/usr/lib/python2.7/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

When researching this issue, I see people ask for the output from i2cdetect -y 1 and lsmod. I'm not exactly what this tells you, but here it is.

$:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- 1c -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- 46 -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- 5f 
60: -- -- -- -- -- -- -- -- -- -- 6a -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
$:~ $ lsmod
Module                  Size  Used by
rfcomm                 49152  6
cmac                   16384  1
bnep                   20480  2
hci_uart               36864  1
btbcm                  16384  1 hci_uart
serdev                 20480  1 hci_uart
bluetooth             368640  29 hci_uart,bnep,btbcm,rfcomm
ecdh_generic           28672  1 bluetooth
fuse                  106496  3
evdev                  24576  4
brcmfmac              307200  0
brcmutil               16384  1 brcmfmac
snd_bcm2835            32768  1
snd_pcm                98304  1 snd_bcm2835
cfg80211              573440  1 brcmfmac
snd_timer              32768  1 snd_pcm
rfkill                 28672  6 bluetooth,cfg80211
snd                    69632  5 snd_timer,snd_bcm2835,snd_pcm
i2c_bcm2835            16384  0
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
fixed                  16384  0
i2c_dev                16384  0
ip_tables              24576  0
x_tables               32768  1 ip_tables
ipv6                  434176  42

Any idea (1) what I'm doing wrong or (2) how to troubleshoot this issue?

3
  • 1
    have you read this old github thread - seems relevant - actually this issue looks closer to yours Commented Jul 30, 2018 at 6:02
  • Turns out...it was the device. I swapped in a different Sense HAT and everything worked beautifully.
    – Ben Downey
    Commented Aug 21, 2018 at 3:26
  • Can you please accept an answer with a click on the tick on its left side? Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Commented May 1, 2020 at 8:40

2 Answers 2

1

The questioner found the solution as he commented:

Turns out...it was the device. I swapped in a different Sense HAT and everything worked beautifully. --@BenDowney

0

same issue for me. I have tried all the software solution you can find online... nothing worked..

But, a lot of threads suggested that it's a bad Hat... but I gave it a last try. Unplug it, and very carefully plugin it into my pi. Magic.. it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.