|
Forum Index : Microcontroller and PC projects : AI Research Project Ongoing
| Author | Message | ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11516 |
Not yet but..... |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3784 |
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. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on FOTS |
||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4335 |
It can cope with such somewhat (only slightly, e.g. missing paren) malformed and quite terse input - wow. John |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3784 |
Also catches and silently adjusts misspellings and other errors. Pretty good at understanding what I meant rather than what I said--without asking me about it. Regarding terse, it did ask if I meant literally "1 2.7" or whether that stood for something. I said literally, and on it went. This morning I noted that I had no readings for today. I had forgotten to tell it to reset just after midnight. So I told it that, and it fixed it immediately--remotely, where I have no serial access from my laptop. While I am doing this over telnet with a "W" Pico, it should also work over serial. But it's the remote access that seals the deal for me. Pico W and 2 W for me going forward. So far the Pico W wifi seems more reliable than the connection on the ESP32-C3Supermini was that the Pico replaced--even though I had enhanced the ESP with a big cap on power and Peter Neufeld's great antenna mod from the Annex forum. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on FOTS |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |