Facit 4070 paper tape punching with Arduino mega

A couple of months ago, I had a request from a friend to produce a paper tape as an RSVP to a wedding invitation that he’d received on floppy disk. I dug out my old Facit 4070 in my collection and set to seeing if I could interface it with something modern. This blog post chronicles the results.

Connection from Facit 4070 to Arduino Mega for code:

Facit 4070 D -> Arduino Mega Pin
1 -> A8
2 -> A9
3 -> A10
4 -> A11
5 -> A12
6 -> A13
7 -> A14
8 -> A15
9 -> D9
10 -> D10
11 -> D11
12 -> D12
25 -> GND

I didn’t actually use pin 12 (Punch Ready) in the end, as it was proving unreliable, so I just used timings – a quick and dirty solution was all that was needed, and eventually it proved robust enough with delays in sending the data.

The code was written to take commands from a menu system to set up the arduino and then punch data.  The menu is as below:

Facit 4070 printer arduino interface
====================================
? - show this information
a - punch message in ascii
b - punch message in EIA code
c - clear message
d - display message
e - punch message in ebcdic (no parity)
f - advance tape 10 spaces and punch feed holes
h - punch message human readable
m - enter message
o - toggle odd or even parity
p - turn on/off parity
s - advance tape 10 spaces
v - show version information

To use it, you send an ‘m’ followed by your message.  You then can select if you want parity or not, and odd or even parity if you’re using ascii.  Following that, you can send an ‘a’, ‘b’, ‘e’ or ‘h’ depending on what character encoding you want to use.

 

 

Photo gallery of Facit 4070 project

Github repository of Arduino code to drive Facit 4070

Video on Facebook of the punch working

Self driving cars… and open source systems

So I just watched an interview with George Hotz, you can watch it here: https://www.youtube.com/watch?v=aqdYbwY9vPU

For those that don’t have the time, George jailbroke the iPhone when he was quite young, and jailbroke the PS3, was threatened by Sony and is a proud proponent that once you’ve bought something that you should own it and be able to do what you want with it.

He’s taking it to the next step, and allowing you to add on a self-driving car system to any car (well, he’s aiming for 50% of the cars sold in the USA next year).  They obviously should have fly by wire controls so that his system uses the built in actuators, but as a sensor and processor platform he’s using the mobile phone.

What’s even more fun is that he’s making this completely open source, he’s crowd sourcing his data (download chffr for your phone) by offering a dashcam that then uploads driving data after it gets home.  All his software is available on github under an MIT license, and he thinks that we’ll have a critical mass of self driving cars in 5 years.

Now I’m looking forward to those days, not because I don’t like driving, but because I enjoy driving, but I don’t like repetitive day-to-day commuting driving, or driving to meetings when I’m thinking about the presentation I have to give and so on.  I would love to be able to have the choice to sit down and tell the car to take me home and have a nap on the way – hey, I’m getting old(er), I deserve a nap now and again.

Take a look at Comma Ai, maybe your next car won’t have to have self driving systems built-in, you’ll be able to buy it as an addon.

 

Goodbye dear friend

For a number of years (more than I can remember, but between 15 and 20) I’ve had my web hosting on a box in my office beside my desk on a machine called pcbo.dcs.aber.ac.uk.  We’ve had our ups and downs over the years, but she became so long in the tooth, and a security scan last week prompted me to do something about it finally.  Today I pulled the plug on her (literally), and have switched over to my new rented server in a different country.

No longer will I hear the rattling of the hard drive when someone looks through a lot of my photos or web crawlers start indexing my site, and it’s just a silent beige box waiting to be thrown out.

All that remains are all the blog posts that I moved over onto this new server, and a CNAME record that redirects all traffic to the new box.  Some links from pcbo will still work, but most will change – this is a new machine with different operating system and web server software, much more modern and up-to-date, which should be able to cope with security patches much better.

It’s really something I should have done years ago, but now it’s less of a worry that I could be an attack vector on the university network.

So long, old girl.  You were old and noisy, and the office is quieter now.

New Server

So I finally bit the bullet and started renting a hosted server.  Yes, this is long overdue and I can finally turn off the extremely old machine in my office.  What prompted this you ask, well it could have had something to do with the latest security scan on that old machine.  The OS and software was so old that upgrading it was going to be an absolute nightmare, and I really wanted something else up and running before I took the old one down.

Anyhow, I’m renting a server (not a vps) from www.online.net in Amsterdam an Dedibox SC SATA 2016 for €8.99 a month + Tax, which is not too bad a price for a dedicated box with 4G of RAM, 1T of disk space and a dual core processor, oh yes, and 2.5Gb/s network connectivity.

Anyhow, the migration from the old version of wordpress was slow, but apparently painless – I still need to check that everything came over safely, but on the surface it looks to be ok.  Of course, the new server has a letsencrypt.org certificate so it’s all https too.

There’s also a new gallery, I’m trying out piwigo after installing and then deleting zenphoto, which had issues with downloading the original sized images, which was a shame as it seemed like quite a nice system.

 

Stuff from FOSDEM

What I saw of FOSDEM this year was great, I didn’t see very much because I’m now on staff so have lots of responsibility during the weekend. I did manage to see some lightning talks whilst moderating the room though.

LibrePlan is pretty amazing for a piece of free software from what I can see – it’s a project management suite for a whole company which runs on the web.

PMD5 (catchy name) is a static code analysis tool, which can help keep on top of good practice and good coding style.

Wazaabi is a nice implementation of separating the parts of a UI from the rest of the program. It has an interctive editor that produces XML descriptions of the UI that then get loaded and generated at runtime.

David Fetter made some good points in Threat Modelling Revisited, but I’m not sure how much impact it can make on society – but we can at least adopt them at grass roots level and hope that they filter up.

Mike Sheldon gave an extremely good talk on gnu.fm and libre.fm

I was interested in the talk on Open Remote as I’m rather into home automation.

MuseScore looked very interesting from their stand, and although I didn’t see the talk, AudiVeris looks like it should work with it well.

Overall a great conference again, and I’m looking forward to the post-mortem for this one and the planning for next year already.

On “Reflections on Trusting Trust”

In 1984, Ken Thompson wrote “Reflections on Trusting Trust”, and it is still valid today.

All students writing anything higher level than machine code (does anyone still do that?) should have an appreciation of what goes on at various points in the toolchain, and how it can be exploited at each of those levels.

The article can be read here and is also has some refelections on Open Source to consider.

Obfuscation can happen at many levels and nobody’s commits should be taken at face value – only vigilance in code reviews will keep everyone honest.

Oh, and apparently he implemented it, but never distributed the compiler.

A short video

For those of you wondering what FOSDEM is all about, here’s a short video that explains a little…

It’s a relaxing look back at what was a very hectic conference for me, so it is interesting to get a different view.

Oh and Aber Comp Sci students feature in it too…