2026-07-07 08:00:00
Okay, enough theory. Time to actually start implementing. First step is to download the latest version of the Arduino IDE, which is currently 2.3.10. I've worked with version 1 before so I think I'll get by, but there are also a number of tutorials available to get you up to speed.
That's what it looks like at first boot. Very simple. The Arduino programming language is really just C with a number of useful functions and defines added to make life easier.
Starting from scratch, I get an empty sketch (that's what Arduino calls the source code of a program) with two predefined functions, setup() and loop().
setup() will contain all the setup functionality that only runs once, and loop() is the endless loop that will never terminate which I've mentioned in the previous post.
In my case I want to read the output from the infrared sensor and then evaluate it and pass it on to the computer via USB in the form of keyboard inputs.
This means that the setup() function will contain all the functionality that configures the Arduino to receive input from the infrared sensor and to act as a HID (human interface device) to the computer, and the loop() function will sit idle and wait for a signal from the IR sensor to arrive, and then convert this to some kind of keyboard signal and send it on to the PC.
There is of course a lot more code that's needed to make the microcontroller work properly, but that's all preconfigured already in the IDE and hidden from the user. Which is both a blessing and a curse, because on the one hand it makes working with Arduinos really easy since all the "hard stuff" is already done and hidden, the user doesn't have to worry about it and can concentrate on their implementation right away. On the other hand it keeps the user from understanding what's really going on and what makes the microcontroller tick in the first place. I'm always in favour of understanding how things work and what's really going on, so I feel a bit uneasy with this approach. Maybe we'll look at the "real" code later to see what's actually happening, but for now, let's move on.
Taking a quick tour around the IDE, the select Board dropdown menu allows me to choose the board I'm working with.
The Sketch menu contains options to compile the code and upload it to the board, as well as the library manager, which I'll use later.
And the File menu holds the Examples category which contain lots of code examples to use as a starting point or see how certain things are done in the code.
When I connect my Arduino via USB, it is automatically recognised and shown under the Select Board menu, which is nice. So I can select it and the IDE will automatically load everything that's necessary to work with this particular board. If it wasn't recognised, I'd have to go to Select other board and port and find it in the board manager.
I essentially have two options when it comes to implementing something:
Like I said, I have two options.
Doing everything from scratch and writing all the code myself has the advantage that I'd really deeply and in detail understand what's going on, but it would require to read the datasheet of the controller, read the datasheet of the IR sensor and work out how to get them to talk to each other, which will take some time. I'm lazy, so I'm choosing to go down the second path.
Under Tools -> Manage Libraries... I can get to the library manager. I am looking for some library to read out an infrared sensor, so I search for "infrared" and look through the list of which libraries are available. IRremote by shirriff, z3t0, ArminJo sounds like it might be good candidate, and after reading through it's Github documentation I think that's the one I'm going to use, so I install it.
It comes with a bunch of examples that I can look through in order to understand how to use it.
Receive Demo sounds good, so let's click this and see what happens.
A new window opens up with a bunch of code in it. This is the demo program that receives signals from the infrared sensor. Note that there are two tabs; we'll get back to this.
Scrolling through this, there's a lot of stuff, but I can find the setup() and loop() functions in there.
Looking at the loop() function, I can see these lines:
* Check if received data is available and if yes, try to decode it.
* Decoded result is in the IrReceiver.decodedIRData structure.
*
* E.g. command is in IrReceiver.decodedIRData.command
* address is in command is in IrReceiver.decodedIRData.address
* and up to 32 bit raw data in IrReceiver.decodedIRData.decodedRawData
*/
if (IrReceiver.decode()) {
Serial.println();
This tells me that it will wait for some data from the IR receiver and then send it out via serial.
If a serial port is configured on the Arduino, which it seems to be here, then it will report to the computer as a USB-connected serial device. On Linux this typically appears under /dev/ttyUSB0or /dev/ttyACM0. Under Windows, it's some COM port.
The Arduino IDE has a built in serial monitor (under Tools -> Serial Monitor), so let's open this.
We need to set the correct baud rate for the serial port to work. What's the baud rate of the Arduino's serial port? Scrolling through the setup() function of the code I can find the line
Serial.begin(115200);
So that's the baud rate to set in the serial monitor, 115200 baud. This is the baud rate that's pretty much universally used these days, so whenever a serial connection asks for a baud rate, setting it to 115200 is a good bet.
Okay, let's just upload this to the Arduino and see what happens, shall we?
I can select Verify/Compile from the Sketch menu, which runs through without a problem, and then I select Upload from the same menu to upload the sketch to the board (upload also does the compile step, but I wanted to do it separately first in case there were any problems). This also works flawlessly, so now this program should be compiled and running on the Arduino.
Now I open the serial monitor, set the baud rate to 115200, reset the Arduino (by unplugging and replugging the USB cable, because there's no reset button), and I get this:
Everything in this window is coming from the Arduino via the serial port, so this means the program works, the serial connection works and the Arduino does what it's supposed to.
Next, let's hook up the infrared sensor to the Arduino.
The IR sensor has three pins (taken from the datasheet):
The Arduino has a lot of pins (also from the datasheet):
How to connect them?
GND and Vs is easy, I can just hook them up to the GND and VCC pins of the Arduino, respectively. But where does the OUT pin of the sensor connect to?
Going back to the Arduino IDE, there is a second file open that's called PinDefinitionsAndMore.h. This contains the following table:
/*
* Pin mapping table for different platforms
*
* Platform IR input IR output Tone Core/Pin schema
* --------------------------------------------------------------
* DEFAULT/AVR 2 3 4 Arduino
* ATtinyX5 0|PB0 4|PB4 3|PB3 ATTinyCore
* ATtiny167 3|PA3 2|PA2 7|PA7 ATTinyCore
* ATtiny167 9|PA3 8|PA2 5|PA7 Digispark original core
* ATtiny84 |PB2 |PA4 |PA3 ATTinyCore
* ATtiny88 3|PD3 4|PD4 9|PB1 ATTinyCore
* ATtiny3216 14|PA1 15|PA2 16|PA3 MegaTinyCore
* ATtiny1604 2 3|PA5 %
* ATtiny816 14|PA1 16|PA3 1|PA5 MegaTinyCore
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
* MKR* 1 3 4
* SAMD 2 3 4
* ESP8266 14|D5 12|D6 %
* ESP32 15 4 27
* ESP32-C3 2 3 4
* ESP32-S3 2 3 4
* BluePill PA6 PA7 PA3
* APOLLO3 11 12 5
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
*/
These are the pin mappings for different boards. I have an Arduino (clone), so the first line applies, which means data from the IR receiver is expected on Pin 2 of the Arduino. So I'll connect them like this (the IR sensors datasheet suggests a capacitor and a resistor in the power lines, acting as a low pass filter to smooth out any high frequency ripples in the supply voltage, but I think I can get away without them for now):
And here's what it looks like in the real world:
That's a nice and janky setup. I like it. But does it work?
It does! Every time I push a button on the remote, the Arduino sends back these two lines:
Protocol=Apple Address=0x34, Command=0xC, Raw-Data=0x340C87EE, 32 bits, LSB first, Gap=536700us, Duration=68300us
Send with: IrSender.sendApple(0x34, 0xC, <numberOfRepeats>);
It recognises that it's an Apple remote sending an address and the command ID. The address is always the same, but the command ID is different for each key, which is how I can differentiate them.
Success! I can receive commands from the IR remote on the Arduino.
That's the first step done. The next step is to figure out how to configure the Arduino as an USB input device, and then to put it all together. Stay tuned.
2026-07-06 08:00:00
Yesterday I announced that I'm planning to build a USB-IR receiver for my media centre. Let's look in a bit more detail at what I'm trying to do here. I have three components:
I want to connect the infrared receiver to the Arduino so that the Arduino can receive commands I send from the remote, convert it to something the computer can easily understand (maybe by acting as a keyboard and sending keycodes) and pass it on to the computer (media centre) via USB.
This is just a basic Apple remote I had lying around. I think it came with the white Unibody Macbooks around 20 years ago, and some other devices as well. Mine I think came with a docking station for an iPod, with which it also works.
Once a key is pressed on an infrared remote, it rapidly pulses an infrared LED at a frequency of usually 38kHz (other frequencies in the range of 30kHz to 56kHz can be used, too) and sends out a few bytes of information which contain the ID of the key that's being pressed and maybe some other data. The simplest way to send digital data via light is to just code it as "light on means 1" and "light off means 0". That's not a very robust method of transmission though, so some other methods are usually used, like having a short pulse of light for a "0" and a long pulse for a "1".
We cannot see infrared light, but digital cameras can. You can point the camera of your phone at the front of an infrared remote and see the LED light up when you press a button:
This is a standard component, and there are many variants available. There's a good overview in the Arduino forum of the pinouts of the most common ones.
The one I have is a TSOP31238. It has three pins for GND, Vs (supply voltage) and OUT. How it works is you hook it up to power (3.3V or 5V) and when it receives a signal from an infrared remote, it will just send out the information it received as digital pulses on the OUT pin.
The frequency of the remote control and the IR receiver must match for them to work together. This is a 38kHz receiver, so I hope the remote works on 38kHz as well, but most do.
I have no idea when or where or why I got this, but I've had it in my parts bin for years. This is an Arduino clone called a Pro Micro. Arduino is a project started around 20 years ago by a few guys in Italy who wanted to make microcontroller programming easy, so they developed easy to use boards and greatly simplified the programming aspect. Since then, countless clones and derivatives of the original Arduino boards have appeared on the market. This one is equipped with an Atmel ATmega32U4 microcontroller (MCU, Micro Controller Unit) which runs at 16MHz, has 32KB of flash memory to store the program code, 2,5KB RAM and a 1KB EEPROM for data storage.
This board is really bare bones, it just contains the MCU itself, a crystal oscillator for the clock signal, a USB connector and it breaks out the MCUs pins into a more accessible form. It's just enough to make the microcontroller work.
What even is a microcontroller? Essentially it's a small computer on a single chip. It contains a CPU, program memory, RAM, some memory for persistent data storage and a number of interfaces to the outside world in the form of GPIO (General Purpose Input/Output) pins and more specialised interfaces like a UART (essentially RS232 serial port), analog to digital converter, and pins that speak various bus protocols like SPI, I2C, CAN, USB and so on. All in one chip which is small and runs at low power so it's perfect for embedding in devices where some kind of computing is needed.
If you're not familiar with microcontrollers, the specs above will sound crazy low compared to the phone or computer you're reading this on, but it's more than enough power for what I'm planning to do here. The most important part is that is has an integrated USB controller, so I can just hook it up to any PC without any fuzz. It also has a UART (serial port), so I could connect it to virtually any computer from the last 45 years or so, which is pretty amazing. This tiny thing can talk to your modern MacBook Ultra Turbo Pro Max Tim Cook Special Edition, but also to a Commodore 64.
Microcontroller development used to be pretty complicated, but thanks in no small part to the Arduino project it has gotten much easier.
What's needed is some kind of code editor, a compiler for the target architecture of the microcontroller (called a cross compiler) and some software to flash the compiled binary to the microcontroller.
In the past you had to cobble all these components together separately and try to get them to work (and for controllers that aren't mainstream you still have to), but for popular microcontroller boards like the Arduinos and their clones there's the Arduino IDE which brings everything in one package, ready to go.
There's one thing that is very different in a program on a microcontroller compared to a program that runs on an operating system: The program can never be allowed to terminate. As soon as it finishes, the controller enters an undefined state, because it isn't running any code anymore. And the only way to bring it back is a reset, either through a power toggle, an external reset circuit or an internal timer which resets the controller. So every microcontroller program will at some point enter an infinite loop which it never leaves.
I think that's enough theory for today; tomorrow we'll look at the Arduino IDE and start coding.
2026-07-05 08:00:00
It's that time of the year again. For the past three years I participated in the old computer challenge every year, and I always had a lot of fun, so I wanted to do something this year, too. The topic for this year isn't strictly about old computers, but rather about making something yourself, to combat the onslaught of AI slop that we're all being subjected to on a daily basis.
I like this topic, and so I've been racking my brain without much success on what I could (and want to) make. I currently have a lot of time (thanks to some health issues), but not a lot of energy or ability to focus and work on something for a prolonged period of time (thanks to the same health issues...), so many things I would want to do are probably beyond my current abilities.
So I thought rather than torture myself trying to come up with something elaborate and then failing at it, I'll try my hands on something simple and fun. I'm going to use an Arduino to build a USB infrared receiver, so I can control my media centre (which is a Raspberry Pi running Kodi) with an infrared remote control. (I know I can attach the IR receiver to the Pi's GPIO pins directly, but using USB makes it more universal.)
That might sound complicated, and in the past it would have been, but thanks to Arduino and tons of available software libraries it should actually be pretty straight forward. I'm also a firmware developer by trade, so this falls way within my comfort zone.
I don't even have to buy anything, because all that's needed is an infrared receiver, a remote control and a random microcontroller board, of which I have way too many anyway. So I dug out a few parts I had lying around, and that's my project for this year. Make something usable out of the parts in the picture, and maybe 3D print an enclosure to make it look nice.
The goal here is to build something (semi)useful, but also to create a tutorial on how to get started building something with an Arduino, so that anyone who is interested in working with microcontrollers but is maybe a bit intimidated by it can follow along and see that it's actually fairly easy to get something going.
Should be fun. I'm going to get started now, I'll post updates throughout the week.
Continue here:
2026-07-04 08:00:00
It keeps happening. I can't control it. Sometimes, I feel nostalgic for some old piece of tech, and before I know what's happening, I'm already browsing eBay looking for one. That's how I ended up with an old Thinkpad from 2004 recently. And now it happened again, and so I'm now the proud owner of a Sony Cassette Walkman. Despite not having any tapes anymore....
Ok, so I got nostalgic for Walkmans (Walkmen?) and tapes recently, and as I was browsing eBay I found this one, sold as not working, and it cost only 17,50€ including shipping. It looks a little beat up, but I'm fine with that. In fact, I prefer it because I noticed that if I buy some retro hardware that still looks pristine, I'm hesitant to use it because I'm scared I will scratch it up. So when a device comes with some cosmetic damage already, that's perfect for me.
I also bought a tape, because what would I do with a Walkman without a tape? It's one of my favourite albums by Rush, Signals from 1982.
The Walkman is the Sony WM-EX521 from 2002, which is a pretty late model. It's not one of the classics from the 80s, but I really like the design, the case is made out of metal so it looks and feels really solid and with it being relatively young, I don't expect too many problems. In fact, I had a suspicion that the only thing that was wrong with it might be the belt. Tape drives have rubber belts in them which link the motor with the tape mechanism, and these wear out over time. They can become loose or lose their elasticity, some break and some also try to turn themselves back into crude oil, which leaves a giant mess behind.
So when the Walkman arrived, I opened the back to see how it looked on the inside, which required putting it on a heat plate for a few minutes to soften the adhesive, and then I could carefully insert a plastic tool between the frame and the back cover and start prying... nah, I'm kidding. This was made before all of that nonsense. You take out five screws and you're in. Which is how it should be.
Anyway, I took the back off, stuck a battery in, pressed play and I could see that the motor was spinning, but the belt was loose and wasn't moving. Suspicion confirmed, the belt was bad. Thankfully it was just worn out and hadn't disintegrated yet, so that's an easy fix.
I ordered a new belt here, which arrived a few days later from Portugal, and replaced the old one. I also sprayed some contact cleaner into the volume potentiometer while I was at it, because it sounded very noisy and scratchy. Here are some pictures, and you can see the old, worn out belt next to the new one. It's literally twice as long! No wonder it wasn't working anymore.
There was one more problem though: the tape ran slow. I'm very familiar with these songs and I noticed pretty quickly that they sounded kind of slow and tired here. There is a trimmer on the circuit board which adjusts the playback speed, and there are special calibration tapes which have a tone of a precise frequency recorded on them, so you can connect the tape player to some measuring equipment and dial in the speed until the tape plays the tone at the right frequency.
I don't have such a tape however, so I did this: The first song on the album, Subdivisions, starts with a single note, played repeatedly on a synthesizer. I checked the version of the song on Youtube with a guitar tuning app and figured out that this note is an F#. So I played this part of the tape on the Walkman over and over again through a speaker and slowly adjusted the speed upwards until that note also showed as an F# on the tuner (it started out being close to E, so almost a semitone lower and slower than it should have been). This might not be the most precise way to calibrate the Walkman, but it is good enough for my taste.
Then I put the Walkman back together and I was done.
Except, it turned out I wasn't quite done yet. I played the tape for a bit, and at first it sounded fine, but after a few minutes it began to slow down and playback eventually stopped. And it wouldn't fast forward or rewind, either. I suspected that the tape might have been lying around unused for years, if not decades and as such might be a bit hard to turn. And maybe all it needed was to be wound back and forth a few times to loosen up.
Now, I could have done that with a pencil like we used to do, but I was too lazy, so I came up with a different solution: I 3D-printed a cog that fit into the tape, attached that to my battery powered drill and wound the tape back and forth a couple of times this way. And I'm happy to report that with this completely sensible and not at all stupidly overengineered solution, the tape plays perfectly now!
And with that, I now have a perfectly working Walkman again, something that I haven't had in more than 25 years. And I don't think I ever had a Sony.
So I guess now I have to go and buy some more tapes.
2026-07-03 08:00:00

I recently had a "phone support" call with my parents, where they needed help with their computers and smartphones and the internet router. They regularly ask me for help, because they're completely overwhelmed and out of their depth when it comes to modern technology, and it makes me sad to see how much they struggle with their devices. We have incredible technology these days; things that 40 or 50 years ago were pure science fiction, like a supercomputer that you carry around in your pocket and that is connected at all times to the rest of the world, can play music, can play movies, can run games, can record video... it can do virtually anything you can think of. And yet it's terrible, especially for elderly and non tech-savvy people.
Technology is supposed to make our life easier. That's why we have it. But somewhere in the last 20 years or so we completely abandoned this idea and created devices that are downright hostile to the user. They bombard us with notifications, demand our constant attention and insist that we make an account here, enter our personal data there, create a password (whoops, this one's not strong enough - try again!), solve a captcha, verify our identity and on and on and on. And my parents, who grew up at a time where the most complicated piece of tech they had at home was a black and white TV set that had ONE KNOB to select the channel are predictably completely overwhelmed by all this bullshit. It makes me so sad and angry to see this.
We really messed up here. The technology that we have today, as amazing as it is on paper, isn't making our life easier anymore. It's just creating headache after headache. It wasn't like this 20 years ago, and I hope it won't be like this 20 years from now. But today, unfortunately, we have to deal with it and I'm going to have many more support calls with my parents trying to help them whip their tech into doing what it's supposed to.
At least that gives us something to bond over as a family. Thanks, Silicon Valley.
Articles
Software/Services
Videos
Around the Small Web
2026-06-26 08:00:00

It's July again! Soon, anyway. And this means two things: Heat waves (hate it) and computer shenanigans thanks to the Old Computer Challenge (love it). This is what I started this blog with three years ago, and I've participated every year since. Last year the community was a bit meh, and for a while it looked like nobody was interested this time, but Tekk came up with a nice concept and updated the website accordingly. This year's challenge is again not strictly defined, but I like the topic: Make something yourself, to combat the onslaught of AI slop we're being subjected to. I think that's a great idea, and I'm sure I'll come up with something and I hope some of you will, too.
Articles
Software/Services
Videos
Around the Small Web
Misc