0

My "sense hat" sits ontop of a raspberry pi 3. I've completed the installation instructions found at https://www.raspberrypi.org/documentation/hardware/sense-hat/

lexu:~> sudo apt-get update
lexu:~> sudo apt-get install sense-hat
lexu::~> cp /usr/src/sense-hat/examples ~/ -a
lexu:~> sudo reboot

But when I try to run the 'snake' example, I get a 'Event device not found." - error. Apparently the "joystick" can't be found/read from. Here's the relevant c-code:

    evpoll.fd = open_evdev("Raspberry Pi Sense HAT Joystick");
    if (evpoll.fd < 0) {
            fprintf(stderr, "Event device not found.\n");
            return evpoll.fd;
    }
0

entering sudo chmod 666 /dev/fd1 fixed the problem!

lexu:~> sudo chmod 666 /dev/fd1

Explanation: The code examples assume that you are running either as root or as a user in that belongs to the group video. My personal user 'lexu' doesn't, so I had to change the access rights.

  • Would in that case useradd -G video lexu not be "more right"? – Ghanima Apr 3 '16 at 13:23
  • @Ghanima: "video" didn't make sense for a joystick, at least for me, but yes, your solution also works. – lexu Apr 3 '16 at 13:57
  • Well, it's the group you named... therefore. – Ghanima Apr 3 '16 at 14:21
  • These types of problems are why they invented the device tree as an alternate way to load modules. A hat is supposed to have an eeprom the has an overlay that adds the hat to the tree in the boot loader. The tree loads modules with a "compatible" statement. It simplifies things, but this site is all about complicated. 😀 – PaulF8080 Apr 14 '17 at 15:49
  • Thanks! Sounds interesting ... Can you provide a link to some documentation? – lexu Apr 18 '17 at 14:56
0

the group video is required for the LED grid.

the group input is required for the joystick and causes the error mentioned above.

don't forget to relogin after usermod.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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