Repository navigation
picocalc-extras 2.5 lets programs be servers: net/ can listen for connections and keep several open at once, and gets the time from the network. There's also screenshots for any program on the text starter.
net/
- Several connections at once:
net_dial()andnet_listen()/net_accept()hand back a connection each, read and written with thenet_conn_*calls. Two by default; a program that needs more setsPICOCALC_NET_CONNSbeforepicocalc_net()(calcftp uses three). - Listening, so a PicoCalc can be the server: calcftp's FTP server is built on it.
net_time()asks the NTP server in/ntp/ntp.cfg(or pool.ntp.org) for the time, for a program that wants the clock set without the shell's help.- The 2.4 calls (one connection at a time) still work as before, so ping and calcterm build unchanged.
net/test/: the connection code checked on a PC against lwIP itself, withmake check.
screenshot/
lcd_screenshot("myprog", ...) saves the LCD as it is to /screenshots on the card, as a 320x320 BMP named with the date and time when the clock is set (myprog-2026-11-23_114502.bmp), or numbered when it isn't. One call from the program's key handling; Shift+F5 (KEY_F10) is the suggested key. It needs the text starter v0.17 or later. A program that lets the text driver scroll the screen in hardware gets a picture that's rotated after scrolling (the text starter's lcd_unblit() doesn't account for the scroll yet).
Tried with
calcftp on a Pico 2 W PicoCalc: FileZilla, Windows' and Linux's ftp clients and curl, uploads and downloads of single files to 38 MB and folders of MP3s, the clock set from net_time() and file dates right, and Shift+F5 screenshots saved and opened on a PC.