For the LCD/Joystick HAT: https://www.waveshare.com/1.44inch-lcd-hat.htm
PIN Mapping:
| Symbol | Raspberry Pi PIN (BCM) | Description |
|---|---|---|
| KEY1 | P21 | Button 1/GPIO |
| KEY2 | P20 | Button 2/GPIO |
| KEY3 | P16 | Button 3/GPIO |
| Joystick Up | P6 | Joystick Up |
| // Вешаем на прикосновение функцию handleTouchStart | |
| document.addEventListener('touchstart', handleTouchStart, false); | |
| // А на движение пальцем по экрану - handleTouchMove | |
| document.addEventListener('touchmove', handleTouchMove, false); | |
| var xDown = null; | |
| var yDown = null; | |
| function handleTouchStart(evt) { | |
| xDown = evt.touches[0].clientX; |
For the LCD/Joystick HAT: https://www.waveshare.com/1.44inch-lcd-hat.htm
PIN Mapping:
| Symbol | Raspberry Pi PIN (BCM) | Description |
|---|---|---|
| KEY1 | P21 | Button 1/GPIO |
| KEY2 | P20 | Button 2/GPIO |
| KEY3 | P16 | Button 3/GPIO |
| Joystick Up | P6 | Joystick Up |