FNakano / CFA

Computação Física e Aplicações
22 stars 1 forks source link

WebREPL + Microdot #3

Open vetorL opened 2 months ago

vetorL commented 2 months ago

https://bhave.sh/micropython-microdot/

FNakano commented 2 months ago

Hi! The code in the link may run its web server and accept webrepl connections simultaneuosly. This discussion: https://github.com/orgs/micropython/discussions/13161 has details about how to do it. The main thing is to call time.sleep or time.sleep_ms in the server code in order to cooperatively pass control to webrepl.

calling time.sleep(p_sec) or time.sleep_ms(p_msec) will execute mp_hal_delay_ms(ms)

Thanks a lot for sending the link!

FNakano commented 1 month ago

Succeeded to play a song and (simultaneously) serve a page. See: https://github.com/FNakano/CFA/tree/master/projetos/AsyncioTryout#results-2 and folder deviceContent2