Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. import pygame
  2. import time
  3. from pygame.locals import *
  4.  
  5.  
  6. pygame.init()
  7. pygame.joystick.init()
  8.  
  9. my_joystick = pygame.joystick.Joystick(0)
  10. my_joystick.init()
  11.  
  12. while True:
  13.     print(my_joystick.get_axis(0))
  14.     time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement