Add pico 2026 update

Vibecoded:
- User binary input of the user id
- confirms with send button
- User input of the rating
- Send button sends a get request to the server
This commit is contained in:
2026-03-27 22:42:43 +01:00
parent 19f2dbd3a0
commit 4da779a125
6 changed files with 250 additions and 0 deletions

25
pico_2026/main.py Normal file
View File

@@ -0,0 +1,25 @@
import wifi_client
import rate
# set SSID and PASSWORD variables to the configurations of the laptop access point
SSID = 'Oger-fi'
PASSWORD = 'Karlfreitag!'
SERVER_PORT = 3000
SERVER_IP_LOWER = 100
SERVER_IP_UPPER = 102
# connect to laptop hotspot
wifi_client.wifi_connect(SSID, PASSWORD)
wifi_client.search_server(SERVER_IP_LOWER, SERVER_IP_UPPER, SERVER_PORT)
#wifi_client.send_request(42)
# define Pins 0-4 for rate buttons (5 buttons)
rate_button_pins:list = [0, 1, 2, 3, 4]
send_button_pin:int = 6
rate.start_rating(rate_button_pins, send_button_pin)