This is almost too trivial to write up, as the TTP223 does exactly what you’d expect it to do with no other components.
Breakout boards for the TTP223 capacitive touch sensor come in a whole variety of sizes. The ones I got from Simcoe DIY are much smaller, have a different connection order, and don’t have an indicator LED. What they all give you, though, is a single touch/proximity switch for about $1.50
Trivial code to light the Raspberry Pi Pico’s LED when a touch event is detected looks like this:
touch = machine.Pin(22, machine.Pin.IN)
led = machine.Pin(25, machine.Pin.OUT)
For the default configuration, the sensor’s output goes high while a touch is detected, then goes low. This might not be the ideal configuration for you, so these sensor boards have a couple of solder links you can modify:
Active Low — sometimes you want a switch to indicate a touch with a low / 0 V signal. On the boards I have, the A link controls that: put a blob of solder across it to reverse the switch’s sense.
Toggle — if you want the output to stay latched at one level until you touch it again, a blob of solder across the T link will do that. Unlike a mechanical switch, this won’t stay latched after a power cycle, though.
And that’s all it does. Sometimes it’s nice to have a sensor that does exactly one thing perfectly well.
I’m still happily using a Raspberry Pi 2B 3 as a lightweight desktop machine. It’s not my main computer, but it’s pleasantly capable. Set up with a couple of paged desktops (or virtual desktops, as we used to call ’em), I can get a bunch of things done with it.
One feature that really irked me, though, was the way that window switching worked. Or, for greater clarity, didn’t work. Openbox, the standard window manager in Raspbian, didn’t allow you to switch to windows on another desktop with Alt+Tab. As I have a smallish screen, I typically have very few windows per desktop, so I want that ability to move from task to task.
This, however, can be fixed. In your ~/.config/openbox/lxde-pi-rc.xml file, change the keybinding sections for Alt+Tab and Alt-Shift+Tab from:
Update 2015-09: Better yet, install Infinality. It makes font rendering pretty.
Switching back to Linux from Mac is still a process of ironing out minor wrinkles. Take, for example, this abomination (enlarged to show texture):—
… No, I’m not talking about Mr Paul’s antics (or the typo in the TP post, either), but the horrid non-matching ligatures (‘attack’, ‘flubbed’, ‘targeting’) in a sea of blocky text. Almost every programme I was running had this problem. Mouse over the image to see how it could look if you apply this easy fix.
Create (or edit) the file ~/.fonts.conf ~/.config/fontconfig/conf.d, and add the following lines: