PicoCalc/Bin/MicroPython
cuu 9219115667 Fix micropython endless reboot issue with keyboard v1.4 firmware
pico-sdk commit hash a1438dff1d38bd9c65dbd693f0e5db4b9ae91779

https://github.com/zenodante/PicoCalc-micropython-driver  commit hash fa8b24c3d7b4b1b6d621b46ceced787dce69f4c1

micropython commit hash 4efc5e12b94082af16520e73ecdd53a67ceddfcf

all repos above need `git submodule update` to sync with their submodules

PicoCalc-micropython-driver/pico_files/modules/picocalc.py
```
diff --git a/pico_files/modules/picocalc.py b/pico_files/modules/picocalc.py
index 6178ab1..e503ccb 100644
--- a/pico_files/modules/picocalc.py
+++ b/pico_files/modules/picocalc.py
@@ -141,7 +141,7 @@ class PicoKeyboard:
         self.ignor = True
         self.address = address
         self.temp=bytearray(2)
-        self.reset()
+        #self.reset()
         self.isShift = False
         self.isCtrl = False
         self.isAlt = False
@@ -524,4 +524,4 @@ class PicoSpeaker:
             return

         for freqc, msec in tune:
-            self._play_frequency(freqc, msec * 0.001)
\ No newline at end of file
+            self._play_frequency(freqc, msec * 0.001)
```

copy PicoCalc-micropython-driver/pico_files/modules/*.py  to  micropython/ports/rp2/modules
copy PicoCalc-micropython-driver/pico_files/root/*.py to micropython/ports/rp2/modules

get into micropython/ports/rp2/ to prepare to compile,follow the PicoCalc-micropython-driver/README.md to get it done

here is a brief tip

```
mkdir build && cd build
-DUSER_C_MODULES="Path/To/PicoCalc-micropython-driver/picocalcdisplay/micropython.cmake;Path/To/PicoCalc-micropython-driver/vtterminal/micropython.cmake" \
 32   -DMICROPY_BOARD=[TARGET_BOARD]
make
cp firmware.uf2 /media/xxxx/RPI-RP2
```

Supported `TARGET_BOARD` values:
- `RPI_PICO`
- `RPI_PICO2`
- `RPI_PICO2_W`
2025-10-30 14:47:40 +08:00
..
2025-05-13 19:53:45 +08:00
2025-04-18 21:55:24 +08:00

MicroPython for PicoCalc

Here is pre-compiled uf2 files for micropython running on PicoCalc based on PicoCalc-micropython-driver

  • micropython_pico.uf2
  • micropython_pico2.uf2
  • micropython_pico2w.uf2

These uf2 files already included main.py ,so just put into PicoCalc , you will get a python running terminal immediately
No need to use Thonny , for those who interest to try python.

For developers, just visit PicoCalc-micropython-driver

Follow the readme to

  • Flash firmware and upload python code through Thonny IDE.
  • Compile custom micropython firmware for picocalc.

Here is the Sequence for beginners to run python on Pico with PicoCalc:

  1. Put pico into BOOTSEL mode.
  2. Flash correct firmware uf2 file that included/compiled all necessary python modules.
  3. Open Thonny at the mean time, config Interpreter with correct kind and port (usuall /dev/ttyACM0 on linux).
  4. Upload main.py( this is the entry boot up python file) and other py files to /. from left sidebar.
  5. Do nothing but wait for uploading finished,then unplug the Micro-usb cable from pico.
  6. Plug USB-C cable into PicoCalc and Power On to see if everything goes right.

here is the sample screenshots about thonny:

interpreter

micropython