Here we are, final project of the book, Hacking Buttons:
This one uses an Optocoupler (that is, an IC with an LED one one side, and a light sensor on the other, which makes a connection when it senses that the light is on) to press a button in the attached card reader.
The very first line of this chapter starts “Warning: You’re no longer a beginner if you’re doing this project, You’ll be opening up an electronic device and modifying it”, then goes on to explain that sometimes, rather than building something from scratch (say, something to record and playback some audio), it’s easier to control something external, which is where the Optocoupler comes into play, and has the added benefit of having total separation between the systems (because it’s light, rather than something physical, which enables the switch).
In the book’s example, they talk about wiring it up to an audio device - but I had no such thing that I was willing to pull apart, so instead I used my old co-op bank card reader (as I’m no longer with co-op). After pulling it apart, I scored a line down the middle of the button that I was replacing, and soldered a wire to each half, before putting it back together.
The script is nothing special, all it does is power pin number 2 (and 13, which in turn is connected to the little LED you can see flashing on the board) for 150 milliseconds, which hits the switch on the card reader turning it on. It then waits 2048 milliseconds before looping back to the top, causing the button press to turn off the card reader.
So that’s the end of the book - and I’m still no closer to knowing what I want to do with the dumb thing. It’s fine though, as I have a better understanding of its potential (and where it might be more suitable than a Raspberry Pi).
Next, having assigned a budget of £200 to it, I’m working on the makers zombie book, which itself has use for an Arduino in the later chapters.