1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

BOOTSELボタンとshell2udpでFlappy Bird【Raspberry Pi Pico W】

Last updated at Posted at 2022-08-30

ezgif-4-040bd84c1c.gif

BOOTSELボタンを押したときにUDPでリクエストを送る

main.py
import gc
import time
import socket
import network

wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect("aterm-ssid-g", "WIFI_PASSWORD")
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

while True:
    if rp2.bootsel_button() == 1:
        s.sendto(b"", ("192.168.10.100", 8080))
        gc.collect()
        gc.mem_free()
    time.sleep(0.02)

image.png

クリックするだけのサーバーを作る

sudo apt install xdotool
pip install shell2udp
shell2udp 'xdotool click 1'

Flappy Birdを開いて、BOOTSELボタンを押す

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?