Open atsuyaw opened 1 month ago
%%{init: {'sequence': { 'mirrorActors': false}}}%%
sequenceDiagram
participant DEV as Edge device<br>(RPi Pico W)
participant ADC as machine.ADC()
participant DS18X20 as DS18X20
participant WIFI as WI-FI
participant TSDB as TSDB<br>(InfluxDB)
loop
DEV ->>+ WIFI: wlan.connect()
WIFI -->>- DEV: IP
end
loop
DEV ->>+ ADC: <br>get_sensor_temp()
ADC -->>- DEV:
DEV ->>+ ADC: <br>getRawV()
ADC -->>- DEV:
DEV ->>+ DS18X20: getOneTemp()
DS18X20 -->>- DEV:
DEV ->>+ TSDB: <br>urequests.post()
TSDB -->>- DEV: status_code
end
Even if connecting Wi-Fi fails, the current code leaves and tries following phases. Furthermore, the connection phase should be put as boot.py separately.