I had the "LEGO Control Center" when I was a teenager - turns out that was released in 1990! And it was amazing:
http://www.technicopedia.com/8094.html
You could build a 2D pen plotter with it (and a few other great models) and program in a sequence of motor movements!
It was the forerunner to LEGO Mindstorms.
Even before this there was a similar system for the Apple //e where you could code in logo (Control Lab?) I think it was 6 or 9v and had to be tethered to work