Prompt for Claude Code:
A program for you to write in MMBasic and get running on a WebMite Pico W RP2040 W: DS18B20 temperature sensors are on GP9 (ambient, ID-"A"), GP27 (upstairs boiler zone feed, "Y"), GP26 (Livingroom boiler zone feed, "X"), GP8 (Basement, "B"). Reading of 1000 is invalid. For ID "A" and "B" report changes of more than 1 degree; for X & Y, 5 degrees. Send result via UDP to port 46225 at 192.168.2.70. If ping of 192.168.2.70 doesn't work, send to 192.168.2.65.
Format of record is ID temperature 1 2.7 timestamp (where timestamp is in the form YYMMDDhhmmss. Time is set with: WEB NTP -3 (ADT)--recalibrate when AST in effect. Note that the DS18B20 on GP8 is not presently connected, so fail gracefully. Webmite is at 192.168.2.37
There was some initial back and forth because it said it couldn't read the Webmite Manual PDF I had provided it, so it guessed about MMBasic syntax, but I used an Adobe online process to convert it to a Word docx, which it was fine with.
It went on its merry way making and fixing syntax errors even faster than I do, and quickly produced a suitable program. I checked, and the udp logger was receiving and logging the message, but without CRLF. I asked it to add that.
I said it would be replacing an ESP32-C3Supermini which frequently lost wifi, such that when I found I couldn't ping it, I power-cycled a Tasmotized SONOFF Basic switch that it was plugged into. Claude suggested adding a check and retry in the program, and setting up the watchdog. I said to go ahead and do that.
I replaced the ESP, and it's running. No wifi dropouts so far.
I bought 3 of the Pico 2 Ws from Adafruit for $7 each before I returned to Canada from Florida. I wish I'd bought 3 more--Adafruit wants $56 to ship to Canada. PiHut has become very expensive to ship to Canada (used to be cheap). Aliexpress prices are ridiculous for the 2W.
MMBasic code development has never been easier.