| Electronic Components Datasheet Search |
|
101020028 Datasheet(PDF) 13 Page - Seeed Technology Co.,Ltd. |
|
|
|||||||||||||||||||||||||||||
101020028 Datasheet(HTML) 13 Page - Seeed Technology Co.,Ltd. |
|
13 / 21 page ![]() 7/23/22, 8:49 PM Grove - Thumb Joystick - Seeed Wiki https://wiki.seeedstudio.com/Grove-Thumb_Joystick/ 13/21 22 from grove.helper import SlotHelper 23 sh = SlotHelper(SlotHelper.ADC) 24 pin = sh.argv2pin() 25 26 sensor = GroveThumbJoystick(int(pin), int(pin + 1)) 27 28 while True: 29 x, y = sensor.value 30 if x > 900: 31 print('Joystick Pressed') 32 print("X, Y = {0} {1}".format(x, y)) 33 time.sleep(.2) 34 35 if __name__ == '__main__': 36 main() Success If everything goes well, you will be able to see the following result 1 pi@raspberrypi:~/grove.py/grove $ python3 grove_thumb_joy 2 Hat Name = 'Grove Base Hat RPi' 3 X, Y = 506 484 4 X, Y = 484 484 5 X, Y = 506 484 6 X, Y = 506 487 7 Joystick Pressed 8 X, Y = 999 485 9 X, Y = 310 736 10 X, Y = 681 484 11 Joystick Pressed 12 X, Y = 999 277 13 Joystick Pressed 14 X, Y = 999 487 15 X, Y = 506 484 16 X, Y = 501 486 17 X, Y = 509 484 18 X, Y = 511 486 19 X, Y = 510 485 |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |