SenseHat Joystick


#1

Hey guys, I bought i senseHat of you guys earlier this week and it arrived fine and all.
However I started playing with it and the example code and all that. I got to the joystick part of it all lastnight and I couldn’t get it to work. At first I thought i was doing something wrong, however today i tried the following example https://github.com/raspberrypilearning/astro-pi-guide/blob/master/inputs-outputs/joystick.md but still it doesn’t work. I checked the code and everything it’s all the same, it works when I use the arrow keys fine but not when I use the joystick.
am I missing something or is the joystick not working?


#2

Are you using your Pi and SenseHAT via VNC?

You might need to look into the direct joystick driver here: https://github.com/RPi-Distro/python-sense-hat/blob/master/sense_hat/stick.py


#3

Yeah I was.
I didn’t realized doing it through VNC would break it.
Thanks for the pointer :)


#4

I only knew what the problem was because I’d helped someone else figure it out a week or so ago. I don’t understand exactly why VNC breaks it, but I suspect you can solve that by using X11VNC after the regular X desktop has launched.


#5

oh cool, I’ll check it out. Thanks for the new pointer