root@raspberrypi:/boot# cat config.txt | grep mem gpu_mem=256 gpu_mem_256=64 gpu_mem_512=128 gpu_mem_1024=256 and after rebooting multiple times I never get the memory to change : root@raspberrypi:/boot# vcgencmd get_mem arm && vcgencmd get_mem gpu arm=1020M gpu=4M
import time import board import digitalio import usb_hid import sys from adafruit_hid.keyboard import Keyboard from adafruit_hid.keycode import Keycode btn1_pin = (board.GP16) btn2_pin = (board.GP15) # Set up the button btn1 = digitalio.DigitalInOut(btn1_pin) btn1.direction = digitalio.Direction.INPUT btn1.pull = digitalio.Pull.DOWN btn2 = digitalio.DigitalInOut(btn2_pin) btn2.direction = digitalio.Direction.INPUT btn2.pull = digitalio.Pull.DOWN keyboard = Keyboard(usb_hid.devices) while True: if btn1.value: keyboard.send(Keycode.A) time.sleep(01) keyboard.send(Keycode.A) time.sleep(01) keyboard.send(Keycode.A) time.sleep(01) keyboard.send(Keycode.A) time.sleep(01) keyboard.send(Keycode.A) time.sleep(01) keyboard.send(Keycode.A) time.sleep(01) keyboard.send(Keycode.A) time.sleep(01) keyboard.send(Keycode.A) time.sleep(01) if btn2.value: keyboard.releaseall()(Eventually the A keycodes will be swapped for scroll down arrow commands to I can scroll up and down a page) What I'm finding impossible to do is to stop the code mid way though with the press of btn2. is there a way to do this? thanks.
end0: flags=4163<UP, BROADCAST, RUNNING, MULTICAST> mtu 1500 inet 192.168.178.192 netmask 255.255.255.0 broadcast 192.168.178.255 inet6 fe80::c3dc::54cb:22f4:6aac prefixlen 64 scopeid 0x20<link> ether e4:5f:01:db:73:68 txqueuelen 1000 (Ethernet) SOmething more, but I need to type it and I do not think it is neccesarry