Jtouch
PIO based capacitive touch for the RP2040
Install / Use
/learn @AncientJames/JtouchREADME
Software-only capacitive touch for the Raspberry Pi Pico
Any GPIO pin can be used as a capacitive touch sensor.
This code uses a PIO program to detect the capacitance of a finger. First the pin is set to output and pulled low. Then it's set to input with the internal pull up enabled, and the PIO counts how long it takes to go high. There's a tiny difference in the timing of this count depending on whether there's a finger nearby, and by repeating the test thousands of times in a loop, that difference is amplified.
The PIO loops for a fixed length of time (about 16ms, for a 60Hz update rate), and returns a count of the number of charge / discharge cycles.
The Python program tracks the minimum and maximum counts, and turns the current count into a 0-1 level.
https://user-images.githubusercontent.com/14081099/221393030-e98d9114-3211-4b21-a260-b7a585bc5c02.mp4
Related Skills
node-connect
348.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
