~/talk

Micropython Gotchas

Talkat PyCon AU 2019 · 2019-08-02..08-06· [python]
links:none on file
slides:none on file

A thermal printer project runs on a Pycom LoPy (ESP32) with 512 KB RAM and 4 MB flash but fails on an esp8266 ~25KB RAM because bytecode compilation consumes RAM; using mpy-cross to precompile and freezing modules fixes that. UART APIs differ across ports—ESP8266 implementation rejects pins and UART construction varies—time functions return integer seconds on some ports and ticks_diff argument order swaps on others, so a small platform-detection shim and platform-specific modules make the code actually work.

AI-written summary · about

  1. 0:00Start
  2. 3:58MicroPython port
  3. 5:42Hardware again
  4. 6:17Let's run it!
  5. 6:33Fact #1
  6. 7:22Crosscompile
  7. 7:35Prepare the cross compiler
  8. 7:47Compile, upload
  9. 8:21Configure UART
  10. 8:47The library code
  11. 10:32Solution
  12. 12:29Suspicious code usage
  13. 16:03Suspicous code (again)
  14. 16:55ESP8266
  15. 19:27Summing up
  16. 21:08Let's talk about UART
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.