Hacker News new | ask | show | jobs
by lode 1287 days ago
Automating my Lego trains was my first introduction to programming, back in the late 1980s using GW-Basic. (When I was about 8 years old.)

I had several stations on a looped track, and controlled the train position by switching on the power to the motor for a certain time.

At first I used a photodiode taped to the CRT monitor (and controlling the motor by lighting up a square in the corner of the screen), later I upgraded to controlling a relay via the parallel port.

3 comments

And then you wrote DOS as your first program as a whiz kid. We see you BillG. Don’t need to brag.
I did more or less the same thing, as did lots of other people.

Wiring the serial or parallell port to something wasn't hard. Instructions for bit banging them where generally found in the library (paper books). Serial had weird voltages but was near indestructible. Parallel was TTL just like anything else digital, so some 74 ICs got you mostly there.

The era where you basically needed to solder if you wanted a computer was just over, so electronic knowledge was still easy to find.

In 1999-ish, my two brothers and I got a box of relays and some reed sensors and solenoids (for track-switches) embedded in lego blocks.

We're all engineers now, the box is treasured and still works. Finding a PC with a parallel port has become challenging though.

One idea is: https://hackaday.com/2017/05/05/converting-parallel-port-cnc...

Plus there are a bunch of off the shelf solutions on Amazon (YMMV).

I love this photo diode solution, reminds me of duck hunt. Brilliant!