astro-pi / python-sense-hat

Source code for Sense HAT Python library
https://sense-hat.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
505 stars 253 forks source link

RuntimeError: unable to locate SenseHAT joystick device #98

Open BlinkOnceTwice opened 5 years ago

BlinkOnceTwice commented 5 years ago

Hello. I was working with Raspberry pi 3 b+ with Raspbian Stretch and kernel 4.14.114 and my sense hat. I was just testing the Sense Hat board i ran this code from sense_hat import SenseHat

sense = SenseHat()
sense.show_message("Hello world")
Basic Hello world code.

But i got this error:

Traceback (most recent call last):
  File "sense.py", line 2, in <module>
    sense = SenseHat()
  File "/usr/lib/python2.7/dist-packages/sense_hat/sense_hat.py", line 92, in __init__
    self._stick = SenseStick()
  File "/usr/lib/python2.7/dist-packages/sense_hat/stick.py", line 57, in __init__
    self._stick_file = io.open(self._stick_device(), 'rb', buffering=0)
  File "/usr/lib/python2.7/dist-packages/sense_hat/stick.py", line 88, in _stick_device
    raise RuntimeError('unable to locate SenseHAT joystick device')
RuntimeError: unable to locate SenseHAT joystick device

I don't know why it's unable to locate Joystick. The hat is connected to Pi properly with standoffs in place.

This is the dmesg log for sense hat


[    8.022385] rpi-sense 1-0046: Raspberry Pi Sense HAT firmware version 0
[    8.022428] rpi-sense 1-0046: Failed to get keys-int descriptor.
[    8.073464] input: Raspberry Pi Sense HAT Joystick as /devices/virtual/input/input4
[    8.078865] genirq: Flags mismatch irq 170. 00000001 (keys) vs. 00002001 (IAxxx-event-irq)
[    8.078887] rpi-sense-js rpi-sense-js: IRQ request failed.
[    8.187819] rpi-sense-js: probe of rpi-sense-js failed with error -16

Please help.