the sense Hat

Hi,
I’m quite new with DietPi, but I recently installed Diet Pi on a Pi3 to host Pi-hole

all was good until I decided to use the Sense hat I have on it. ( for this: https://github.com/simianAstronaut/pi-hole-visualizer)

I did like usual the sudo apt-get install sense-hat to install it but now every time I try a python to do something on the hat it’s not detecting it… did I missed something?

python dns_stats.py
Traceback (most recent call last):
File “dns_stats.py”, line 14, in
import config
File “/root/Pi-holeVisualizer/config.py”, line 11, in
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

Hi,

many thanks for your message. Looks like your HAT device is not recognised by the system

OSError: Cannot detect RPi-Sense FB device

Can you check I2C status within dietpi-config > 4 : Advanced Options > I2C state. It should be set to On

Yes it was not activated, I activate it … convinced that’s the root cause … but no it’s still not working…

any other step I could have missed?

I was looking around and found quite some reports on various boards. Most of the are talking about issues with the Hat themselves. For some users it was working to remove the Hat and re-plug it carefully. Or to set dtoverlay=rpi-sense to the bottom of /boot/config.txt

An ultimative test would be running standard Raspberry OS to see if it is working there.

Thanks yes adding dtoverlay=rpi-sense to the bottom of /boot/config.txt worked for me.

yeah probably something wrong on detecting the Hat correctly. But good that this is working now.

Just for reference, that’s where I got my knowledge from https://github.com/astro-pi/python-sense-hat/issues/28#issuecomment-171975646