Skip to content

Releases

picocalc-extras 2.5

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 25 Nov 20:11
4c02aa6

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() and net_listen()/net_accept() hand back a connection each, read and written with the net_conn_* calls. Two by default; a program that needs more sets PICOCALC_NET_CONNS before picocalc_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, with make 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.

picocalc-extras 2.4

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 20 Nov 23:04
64c0487

picocalc-extras 2.4 adds net/, Wi-Fi for your own programs on a Pico 2 W, with a small ping program as its example.

net/

  • Joins the network named in /ntp/ntp.cfg, the file the PicoCalc shell's NTP command already uses (read with the shell's own parser), so Wi-Fi is set up in one place on the card.
  • One TCP connection at a time, name lookups, and ping (net_ping()).
  • net_leave() tells the router the PicoCalc has gone, so the next program joins at once instead of being turned away for a minute.
  • Every call waits, with an optional progress callback ("Joining MyNetwork..."); lwIP runs in the background meanwhile, so nothing that arrives is lost.
  • Bring it in with picocalc_net(path/to/picocalc-shell) after picocalc_fatfs(). A suitable lwipopts.h comes with it. net/README.md has the lines to copy.
  • It's calcterm's telnet networking, made a piece of its own.

ping

Joins your network, shows the PicoCalc's address, then pings whatever you type (an address or a name) four times, as ping does on a PC. q quits.

Copy ping.uf2 to the card's pico2-apps folder.

Tried with

A Pico 2 W PicoCalc on a home network: replies from the local network in 3 to 9 ms and from 1.1.1.1 in 17 to 20 ms, "No reply" from an empty address without hanging, and the next program joining Wi-Fi at once after quitting.

picocalc-extras 2.3 lets a program use a Bluetooth keyboard and Wi-Fi at the same time

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 18 Nov 22:01
8e7c785

picocalc-extras 2.3 lets a program use a Bluetooth keyboard and Wi-Fi at the same time, on the Pico 2 W's one radio.

For programs (bluetooth/)

  • set(BTKBD_WITH_WIFI ON) before including bluetooth.cmake builds the Bluetooth library with lwIP alongside it. The program supplies its own lwipopts.h.
  • The program starts the radio itself, with its country (cyw43_arch_init_with_country()), and then calls btkbd_init(), which leaves the radio as it found it. Programs without Wi-Fi need no change.
  • The Bluetooth README has a new section, "With Wi-Fi as well", with the lines to copy.

btpair 2.3

The same as 2.2.1, renumbered to match the release.

Tried with

calcterm 0.5: telnet over Wi-Fi to an Ubuntu machine, typed on a Logitech K380, for two days of everyday use.

picocalc-extras 2.2.1: gamepads reconnect

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 11 Nov 00:38
0be400f

picocalc-extras 2.2.1 fixes two things found by using a PS4 pad with the NES emulator.

Gamepads reconnect

A PS4 pad paired, but afterwards wouldn't reconnect: pressing PS made it flash three times and switch off. Before reconnecting, it asks the PicoCalc what services it has, and btkbd had no answer, so the pad hung up. Now the PicoCalc answers, and pressing the pad's home button (PS) connects it again, in btpair and in any program.

Gamepads no longer slow programs down

A PS4 pad sends hundreds of reports a second, over a thousand when it's busy, and the Pico takes every one. In the NES emulator that was enough to make games sluggish and stutter. A gamepad is now held to 125 reports a second (Bluetooth sniff mode, the radio waking every 8 ms), and with that the NES emulator runs as fast as it does with no pad at all.

For programs (bluetooth/)

  • Nothing to change: rebuild with 2.2.1 and both fixes come with it.
  • btkbd_gamepad_sniff(ms) changes the 8 ms; 0 lets the pad report as often as it likes.
  • btkbd_gamepad_reports() counts the reports that have come.

Tried with

A Sony PS4 controller, in btpair and in the NES emulator's Bluetooth build.

If a gamepad misbehaves, press D then F5 in btpair, and send the two files it saves in /screenshots; that log is how both of these were found.

picocalc-extras 2.2: gamepads.

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 10 Nov 22:41
ffd8281

picocalc-extras 2.2 adds a Bluetooth gamepad, alongside the keyboard and mouse.

btpair 2.2

  • G pairs a gamepad, classic or BLE. Gamepads are recognised in the search list and marked "(gamepad)".
  • Once a gamepad is connected, the first page shows its sticks, D-pad, triggers and the buttons held, by number: handy for finding out how a pad numbers its buttons.
  • F forgets any one device, and asks which when more than one is paired.

For programs (bluetooth/)

  • btkbd_gamepad(&pad) gives the gamepad as it is now: up to 32 buttons, both sticks (−127 to 127), analogue triggers (0 to 255) and the D-pad. See bluetooth/README.md.
  • pairing.dat is still PBK2, with new tags GPD0 (classic) and GPL0 (BLE) for the gamepad. Older programs ignore them, and existing keyboard and mouse pairings carry over.

Tried with

  • A Sony PS4 controller (classic Bluetooth), with the Logitech K380 keyboard and M720 mouse still pairing and reconnecting as before.
  • An 8BitDo M30, by Giovanni Pozzobon in PicoCalc Desktop 1.0.0. Thanks, Giovanni.

If a gamepad misbehaves, press D then F5 in btpair, and send the two files it saves in /screenshots.

picocalc-extras 2.1

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 31 Oct 21:22

A Bluetooth mouse alongside the keyboard.

  • btpair 2.1: K pairs a keyboard, M pairs a mouse, F forgets one. Both stay
    paired and connect together, each classic or BLE. The search list says
    which is a keyboard and which is a mouse, when the device says.
  • For programs: btkbd_mouse() gives the movement since the last call and the
    buttons held. btkbd_device_state(), btkbd_device_name() and
    btkbd_forget_device() work for either device.
  • Nothing changes for programs that only use a keyboard: the existing calls
    are the keyboard's, as before.
  • The mouse is saved in the pairing file's PTR0 (classic) or PTL0 (BLE)
    record, beside the keyboard's. Older programs ignore it.

Needs picocalc-text-starter v0.17 or later, like 2.0.

picocalc-extras 2.0

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 31 Oct 20:49

Breaking change: needs picocalc-text-starter v0.17 or later.

Blair's text starter v0.17 replaced its FAT32 driver with FatFs, so everything
here that uses the SD card now uses the f_* functions: the Bluetooth keyboard's
pairing file, btpair's screenshots and log, the picker's folder list, the
PDCurses screenshots, and the picture example.

  • New: fatfs/fatfs.cmake builds FatFs the way the text starter does, as one
    target, picocalc_fs:
    picocalc_fatfs(path/to/picocalc-text-starter) then link picocalc_fs.
  • Files are now dated from the shell's clock (shell v1.2) when it's set.
  • The pairing file's format hasn't changed, so paired keyboards stay paired.
  • btpair 2.0 is built on text starter v0.17 and shell v1.2.

Programs still on text starter v0.16 or earlier can stay on v1.3.

picocalc-extras 1.3

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 29 Oct 22:35
  • btpair 1.3: a Bluetooth mouse pairs and works like a keyboard's
    trackpad (tried with a Logitech M720); btpair's "Pointer" line shows
    its movement and buttons. Its "That didn't work..." message is no
    longer cut off.
  • The README now says to pair a BLE keyboard again after putting it in
    pairing mode: most choose a new identity each time.
  • bluetooth.cmake: BTKBD_FIX_HCI and BTKBD_FIX_L2CAP turn off each of the
    two BTstack fixes, for a Pico SDK whose BTstack has them. BlueKitchen
    has fixed both upstream.
  • The file list (picker/): a program can put its own keys on the bottom
    line (keys_footer), and the line now fits in 64 characters.
  • Built with Blair Leduc's text starter 0.16 with the FAT32 fixes (the
    diamond-dev branch of the fork).

Bluetooth: BLE keyboards, and two BTstack fixes

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 28 Oct 19:33

BLE keyboards now pair and connect, as well as classic ones; btpair marks them “(BLE)”. Tried: Logitech K380 and K480 (classic), ProtoArc XK01 TP (BLE; its trackpad isn’t used).

The K380 no longer needs a power cycle after pairing. Two bugs in BTstack were behind it and behind “couldn’t connect” after Forget. The build now fixes both, from the SDK’s own copy of BTstack.

F5 in btpair saves a Bluetooth log beside the screenshot (/screenshots/btpair-NNN.pklg). If a keyboard misbehaves, send both files with your report; the log opens in Wireshark.

btpair’s files are dated from the shell’s clock.

Copy btpair.uf2 into pico2-apps on the SD card. Keyboards paired with 1.0.1 stay paired.

Picocalc-extras 1.1

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 26 Oct 21:17

Adds a Bluetooth keyboard for programs on a PicoCalc with a Pico 2 W, and btpair, which pairs one.

Copy btpair.uf2 into pico2-apps, run btpair, and press P: it walks you through pairing, then lets you try the keyboard out.
The pairing is kept on the SD card, so every program built with the Bluetooth code finds the same keyboard and connects by itself.
For programmers: two lines of CMake and btkbd_init(). The keyboard’s keys come through the normal keyboard reads, so most programs need nothing else. See bluetooth/README.md.

Classic Bluetooth keyboards only, so far; tested with a Logitech K380. Reports from other keyboards are very welcome.