Author Archives: admin
Waveshare-c6-zero + st7735

https://gitlab.quantr.hk/example/micropython/waveshare-c6-zero-st7735 2025/07/03
Waveshare ESP32-C6-Zero + LVGL + ST7735S
https://www.waveshare.com/wiki/ESP32-C6-Zero Wiring of the ST7735 TFT with an ESP32-C6 SuperminiSCL = 2SDA = 4 (= "MOSI")RST = 0DC = 1CS = 5BLK = 18 Note: If you don't need a dimming you can connect BLK with 3.3V 2025/07/03
Run: Micropython + LVGL on CYD (Cheap Yellow Display

2025/07/02
ESP32-C6-Touch-LCD-1.47 + LVGL + Micropython
2025/07/02
Mac: Run ubuntu command with GUI in docker

Step 1: create Dockerfile Step 2: Build the image docker build -t xclock-ubuntu . Step 3: Set XQuartz and restart it Step 4: Run "xhost + 127.0.0.1", and this "xhost +localhost" wont work Step 5: Run Another way 2025/07/01
Run Micropython in CYD (Cheap Yellow Display) and control the TFT

Official Tutorial From TaoBao Factory : https://github.com/quantrpeter/2.8inch_ESP32-2432S028R Remark: use offset 0x1000 to write the firmware and have to erase flash first, so: Download micropython firmware here https://micropython.org/download/ESP32_GENERIC/ 1. esptool.py erase_flash2. esptool.py --baud 460800 write_flash 0x1000 ESP32_GENERIC-20250415-v1.25.0.bin Download All Files in below links, or by the attachment in this posts ILI9341 Display Driver Download ili9341.py from: […] 2025/06/29
Solved: unable to write to cheap yellow display esp32

In mac, sometime arduino unable to write the program to cheap yellow display esp32, you can type the command manually 2025/06/29
AT28 Flash board

2025/06/29
Quest Migration Manager UI

2025/06/23
Solved : sr: resource: Failed to open resource 'fx2lafw-sigrok-fx2-8ch.fw'

If you have this problem: run: sigrok-cli --loglevel 5 -d fx2lafw --scan , it said failed to find the firmware file So build this project and restart terminal, then you will success 2025/06/19
Muselab Logic Analzyer Nano - Sigrok-cli command
2025/06/18
Micropython for has no SoftI2C
It has no SoftI2C, so change display = ssd1306.SSD1306_I2C(128, 64, SoftI2C(sda=Pin(20), scl=Pin(21))) to import timefrom machine import Pin, I2C, SoftI2Cimport ssd1306 i2c = I2C(1) # Create I2C object display = ssd1306.SSD1306_I2C(128, 64, i2c) # Pass I2C object display.fill(0)display.text("Hello, World", 0, 0)display.show() time.sleep(100) 2025/06/07
Tutorial build micropython for WEACT_F411_BLACKPILL

using st-flash is better then dfu-util because we don't need to put the board into dfu mode 2025/06/07
AT28 Programmer (Java + Arduino)

https://gitlab.quantr.hk/quantr/toolchain/java-at28-programmer https://gitlab.quantr.hk/example/arduino/at28-programmer 2025/06/06
MicrPython SSH1106

IT IS SSH1106,NOT SSD1306 2025/06/04
ESp32 Arduino LED Example

https://item.taobao.com/item.htm?_u=vbuhab0c8fc&id=692235616325&pisk=gfaLsUj6M1dLBGaKsWSMEFEN3lfGiGVU_JPXrYDHVReTeSd3x0DoV4e4H0TlY2m-yRMg-vVnRbi7E-ZndkDkyzeapeYoR8b-FSrNavc3-Qh7fJLuxWD3XQ3USkYoK9u8N-0RntbcoWPE846cnxid94gjO3OBEYg614c8jWtHGWPEzYOMFiq_TQhdgwAINY1t5bhIO4MINF1twb9IPviWChGjC4gSA0t_1jcXApMWA1KstbcWRXGS5hGSZHgSP8N16bksO4gS9i5KQBGpyo2QH1YJL2LWPPhKfiViCiyQJXhnnWapBddr9DHbOAB4G69Z2JnLSwpq9lNYiXePueuI2kwK14QJ72VYfJnTvTLtblN4PcENHnP4OowSKP6XyYq4JomqAILY68UtRAUPaUkQx7ao2y6XZvaUKPn4zpBiEoVgRcefIFer2kwK1qsPZr4xT7vmHbxC61Ky4DGw7oIF1mRpfIltn6iB43oo_fHc6tty4DGZ6xfB_3-rqf5..&spm=a1z09.2.0.0.20712e8dhZRCRN (Set to 115200, otherwise upload will fail) 2025/05/31
香港好多人覺得自己係諸葛亮

諸葛亮勁係無資源嘅情況底下可以有高強嘅執行力。而香港人絕大部份都無執行力。 2025/05/13
STM32 - Serial two 74HC595 shift registers

https://gitlab.quantr.hk/example/stm32/stm32f411ceu6-74hc595-shift-register 2025/04/26
8 segment led display all characters and numbers

2025/04/25
Tutorial: MicroPython + LVGL for ESP32-C6-LCD-1.47

This is the tutorial to compile micropython with LVGL and burn it into the board Steps: If success, you should see this Open thonny and run Then you will see Links you should read https://www.waveshare.com/wiki/ESP32-C6-LCD-1.47 https://github.com/lvgl-micropython/lvgl_micropython Remark: This program is a little bit crazy, first time you run it will success, but if you run […] 2025/04/14
Waveshare ESP32 Zero C6 - RGB led micropython example

2025/04/01
testing ESP32 UART using MicroPython

Mac command to read from UART 2025/02/24
Download Unity international in Hong Kong

I don't understand why US gov list Hong Kong as their enemy Download Unity international tutorial 2025/02/23
command to clone mysql database
2025/02/22
Solved: Modules/_curses.cpython-313-darwin.so: no such file or directory

If you are using macports instead of homebrew, you may have this problem. Solved by this: LDFLAGS="-L/opt/local/lib" CPPFLAGS="-I/opt/local/include" pyenv install 3.12.6 2025/02/16
solved: nextpnr-ice40 Library not loaded: '@rpath/Python3.framework/Versions/3.9/Python3'
run this command 2025/02/07
Solved: macports fatal error: 'boost/filesystem/path.hpp'
Edit CMakeLists.txt, add these two line on top 2025/02/07
Two ways to init the output pin and remain same value
2025/02/02
crazy web uart
if you want to send one single byte this is not working writer.write(new Int32Array([0x4]).buffer); this work writer.write(new Uint8Array([0x4])); 2025/01/29
The correct way to send code to micropython via uart and run

There are two mode in micropython: REPL vs paste mode. I guess the uart of my ESP32 board has no flow control, so you can't send all bytes at once, because it is too fast, so I sleep 100 ms for every 100 bytes. REPL mode You can't just send your python code, you need […] 2025/01/28
香港神奇的Python仔現象

香港有人係咁,廿幾歲畢業出黎做野,做左幾年對隻language開始熟,佢地唔係鑽落去language下面睇下發生緊乜野,例如啲code點compile呀,debug點做呀咁。佢地會作一出個難以解釋嘅現象,就係跳去另一隻high level language到再玩過,而當佢地玩到興起玩左幾年,佢地再次唔係想知道隻language嘅底層,而係再一次又跳去其它high level language到碌多一次,難道唔想知揸係手裏面把刀係咩黎?我叫呢一種現象做「香港Python仔現象」。舉個例子,2003年班友玩vc++,跟住跳去c#,跟住又跳去java,而家又跳去python。因為咁樣跳法本質上對過去學嘅語言都唔方認識得深,所以如果而家有個阿叔好推崇python,對其它language只停留係誇誇其談攞唔出到戰鬥力,佢大概率係咁。 要改變,就要做好科普,揭露python底層所有野,咁先至有機會改變。但呢班友會唔會變未知。 2025/01/28
gitlab backup guide
2025/01/10
Solved Chisel : Error compiling the sbt component 'compiler-bridge_2.12'

When running the chisel book example, we got Error compiling the sbt component 'compiler-bridge_2.12'. Here are the way to solve it git clone https://github.com/schoeberl/chisel-examples.git Edit hello-world/build.sbt Edit hello-world/src/main/scala/Hello.scala 2025/01/09
貴族 vs 老土 (貴族之女,第一個程序員Ada Lovelace)

香港人嘅老土活該沒有科技,我而家分析俾你地睇香港人嘅老土係有幾老土,以及老土嘅香港人點解覺得自己唔老土 第一老土 : 你憑咩 佢地所謂嘅論證不外乎係黎自你所受嘅教育同埋經驗,佢地會話你又唔係哈佛MIT學咩野人搞之類嘅言論,但呢班無讀歷史嘅人唔知好多科學家都係自學為主。(見下圖) 香港人老土在永遠人地努力做,佢地就會問"你憑咩",其實呢一句好無敵,因為當你做緊而又未做完嘅時間你的確無力反駁呢一句,由其是你係做緊一啲你自己都唔知做唔做到嘅野時,你更加無力反駁。但呢班友永遠唔明,科學嘅發現好多時就係意外發現,好多野唔做就唔唔知得唔得,而呢班咁嘅人最叻就係用呢句去質疑你,佢地嘅內心世界就係「嘩,你做呀,你有無諗過㗎」,跟住就會覺得自己好似好有經驗,好似真係以為自己曾經做過咁,知道你條路係唔通,其實個現實就係,呢班友根本無做過,而更深一層嘅就係,佢地連去嘗試嘅基本實力都無,佢地唔係連個for-loop都寫唔出就係技術只夠寫啲script仔,真係可憐。 第二老土 : 話人畫餅 呢個世界唔係所有人都需要理想,而理想呢樣野個實現率必定為低。香港地當然多人畫餅,但係係唔係畫餅好容易分,得個噏字唔做咪就係畫餅囉,會做嘅又點會算係畫餅呢,但係呢班咁嘅人就最叻攻擊啲為理想而行動嘅人。佢地個底其實係數佬,內心世界非常現實,我估計佢地後生嘅時候都曾經有理想,但手料跟唔上人到中年完全無哂動手能力,思想上變得越黎越現實,腦裏面諗一百個可能性去否定執行嘅成功率,不停俾借口自己逃避執行以至完全喪失執行力,佢地係編程上嘅實力只能點評人地寫嘅program,而自己乜都寫唔到。 Ada係連電都未係好識運用嘅年代就話要令機器有計算能力,如果香港班友返去佢嗰個時代,呢班友就會話人畫餅。嗰個時代根本就係非常簡陋。當呢班友話人畫餅,佢地嘅內心有一種好充盈嘅感覺,佢地會覺得:「嘿嘿,我真係叻,無俾你利用到」。但係個現實係咩呢,就係呢班友手料根本連俾人利用嘅資格都無,同你講下理想只係發下噏瘋而矣,唔好諗得自己咁有料可以俾人利用。 第三老土:話做唔做或者揾借口唔繼續做 話做唔做嘅人主要會話你唔夠條件做,做緊又揾借口唔繼續做嘅人會話發現你原來唔夠料做,又或者話發現你身上有啲缺點而唔再同你合作做。總之無論係咩原因都好,結果就係唔做。我地睇返Ada Lovelace個Case,當佢話要做一部Thinking machine嘅時候,佢mentor Charles Babbage唔會因為佢太天馬行空而屈佢畫餅,想反地會動手一齊做。而Charles Babbage亦都唔會話Ada無足夠嘅錢同埋未讀過大學就話人無料而做做下唔做。 2025/01/07
A Super Good scala sbt tool tutorial
https://conorfennell.github.io/scala-zen/articles/sbt.html 2024/12/31
解剖玩具麥輪車

MX512G : 低压单通道有刷直流电机驱动器, RMB $2MX1616S : 双路有刷直流马达驱动电路, RMB $7.8TRSP5040A : SOP8語音OTP芯片40秒碩呈語音播報IC程序開發, RMB 0.27RF2520A : 无线遥控收发器芯片, RMB $4.3 2024/12/28
重點係Draw small + detail,畫大無用

第一步其實好簡單,就係視覺角度唔好錯,畫細畫detail,畫太大舊野無意思 2024/12/27
Blender : Faucet

This tutorial give us a very good demo on rendering: https://www.youtube.com/watch?v=ukd1zO0Q-h4&t=317s 2024/12/25
iPad stand using FreeCad

2024/12/20
Tutorial to setup RF-Nano

https://item.taobao.com/item.htm?_u=ibuhab0bb1b&id=628418040642&spm=a1z09.2.0.0.76e02e8dYbXP6k 2024/12/18