Hiho, I'm trying to read an USB joystick attached to my Raspberry Pi with this python script:
import pygame
pygame.init()
print pygame.joystick.get_init()
print pygame.joystick.get_count()
j = pygame.joystick.Joystick(0)
print j
j.init()
print j.get_init()
print j.get_id()
for i in range(0, j.get_numaxes()):
j.get_axis(i)
pygame.quit()
all I get as output is this:
1
1
<Joystick object at 0xb6cb2120>
1
0
SDL_JoystickGetAxis value:0:
SDL_JoystickGetAxis value:0:
SDL_JoystickGetAxis value:0:
SDL_JoystickGetAxis value:0:
and I don't know why.
The values shouldn't be 0.