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?