2024-08-01から1ヶ月間の記事一覧
import timeimport networkimport socketfrom machine import Pin, PWM pwm_f_r = PWM(Pin(15), freq=50)pwm_f_l = PWM(Pin(16), freq=50)pwm_b_r = PWM(Pin(10), freq=50)pwm_b_l = PWM(Pin(21), freq=50) #stopduty_r_stop = int(65535 * 0)duty_l_stop = …
import time import network import socket from machine import Pin, PWM pwm = PWM(Pin(16), freq=500) duty = 0 def connect_to_wifi(ssid, password): wlan = network.WLAN(network.STA_IF) wlan.active(True) wlan.connect(ssid, password) max_wait = …