- Edit
/boot/firmware/config.txt. Add the following lines:
enable_uart=1
dtparam=spi=on
dtoverlay=piscreen,drm,speed=16000000
- Open
sudo raspi-config. Under Advanced Options→Wayland, click X11. Then click OK & Finish. Don't reboot the Pi.
/boot/firmware/config.txt. Add the following lines:enable_uart=1
dtparam=spi=on
dtoverlay=piscreen,drm,speed=16000000
sudo raspi-config. Under Advanced Options→Wayland, click X11. Then click OK & Finish. Don't reboot the Pi.Modern libinput uses an Affine Transformation Matrix. To map a raw touch coordinate
| # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries | |
| # SPDX-License-Identifier: MIT | |
| # Use this example for digital pin control of an H-bridge driver | |
| # like a DRV8833, TB6612 or L298N. | |
| import time | |
| import board | |
| import digitalio | |
| from adafruit_motor import stepper |
| import RPi.GPIO as gpio | |
| import time | |
| gpio.setmode(gpio.BCM) | |
| gpio.setwarnings(False) | |
| # Pins | |
| ain1 = 16 | |
| ain2 = 20 |
| # Import required modules | |
| import time | |
| import RPi.GPIO as GPIO | |
| # Declare the GPIO settings | |
| GPIO.setmode(GPIO.BOARD) | |
| # set up GPIO pins | |
| GPIO.setup(7, GPIO.OUT) # Connected to PWMA |