TwitBeeb

TwitBeeb

TwitBeeb Photo by John Honniball

TwitBeeb is a BBC B microcomputer (vintage 1981) from which you can Tweet.

The Beeb itself was my main computer until 1994, I taught myself to program on it. A few years ago I pulled a rather scuffed up BBC out of a skip at Sussex University and took it home. Inside it had an add-on ROM board with several programs in ROM chips including a serial terminal emulator called Termulator. This allows it to connect to other computers via its serial port and for everything typed on the BBC’s keyboard to be sent to the other computer which sends responses back to be displayed on the BBC’s screen. It acts as what used to be called a “dumb terminal”, just handling the input and output while a more powerful computer does the actual work. This was quite a common way of doing things back when computers were room-sized. Several terminals would connect to a large shared computer, possibly over phone lines using modems.

My first tests with the Beeb terminal involved connecting it to a Linux server using a cable I made from this recipe. It was a bit tricky to find 5 pin domino DIN plugs and note the warning about marking the top because you can plug them in either way up. I ran a text-based web browser called Lynx on the server via the BBC terminal and pointed it at Twitter. Termulator was not very good at handling the full Linux terminal and browser, it tended to crash and you can’t use the arrow keys which makes using Lynx awkward. I did manage to send one tweet.

The first experiment with the BBC B and Twitter via Lynx.

The first experiment with the BBC B and Twitter via Lynx.

More recently, I got my hands on a Raspberry Pi. While considering what to do with it I remembered my BBC terminal experiments. Given that the Pi is cast from the same mould as the BBC, in terms of their educational intentions, they seem like an obvious pairing. They share a common heritage, in that the Raspberry Pi’s ARM processor was designed by some of the same team who worked on the BBC Micro. I also enjoy the fact that in this case the terminal is physically far bigger than the vastly more powerful computer it connects to.

Some spec comparisons:

  BBC Micro (Model B) Raspberry Pi (Model B)
Release Date 1st December 1981 29th February 2012
CPU 6502 2 MHz (8 bit) ARM1156 700 MHz (32 bit)
RAM 32 KB 256 MB (262144 KB)
Storage None in this instance, except the 16KB ROMs containing the OS and terminal software. 2 GB SD card

So due to Termulator’s problems handling a full text-mode browser and because that would have been too complicated for use on the stand at an event like a Makerfaire I wrote my own specialised kind of Twitter client. The BBC’s OS has a set of special bytes that you can send to control things like text colour and cursor position, I used these to make it pretty. It reminded me of the kind of programs that I used to write when I was 11, it was kind of odd to be doing that stuff in Ruby rather than BASIC.

TwitBeeb on test at Bristol Hackspace.

TwitBeeb on test at Bristol Hackspace. Photo by John Honniball

Here is the code, on Github. It searches for a hashtag and displays some results on the screen below the title. At the bottom of the screen it shows a prompt very much like the BASIC one, you type your tweet there and press Return to send it. The hashtag is appended for you. The code stops you typing too many characters.

For TwitBeeb’s first public outing at Derby Mini Makerfaire I had the Pi talking to the Internet using a USB Wifi dongle. I set up the network by connecting to the Pi’s serial console from my laptop using a USB to serial converter and a Sparkfun level shifter. When the network was working I connected to the Pi with ssh and moved the USB to serial converter to the Pi and connected the serial end to the BBC (minus the level shifter). I then started Termulator on the Beeb, put it in BBC VDU mode and started the twitbeeb script on the Pi. I used the command line to redirect standard in and out for the script to the serial port device, having first set it to run at 4800 baud and several other parameters using stty.

It was quite popular at the Faire, mostly as a spectacle though. People were reluctant to come up with a witty tweet on the spot. It tweets from the @twitbeeb account, you can see people’s tweets there. Most confusion came when there was a need to find the “delete” key, and also “@” hidden in plain view on a key of its own.

Update!

21/10/2015

Since its public debut at the first Derby Mini Maker Faire in 2012, TwitBeeb has been on show several times. I’m about to show it again at the fourth Derby Mini Maker Faire.

Here are some of its outings:

Bristol Raspberry Jam - August 2012

I set it up in the demo room with a bunch of other people’s projects, then went off to watch some talks. About 20 minutes later someone came over to tell me that my project was on fire. It turns out the capacitor in the BBC’s power supply had failed, as they will do after 30 years. Those capacitors are partly made of paper so they make a lot of smoke when they fail. It didn’t get used much that day.

Barney Livingston - @barnoid@mastodon.me.uk

@barnoid
Disaster with @twitbeeb! Capacitor failure which stunk out the Bristol #RaspberryJam demo area.

Brighton Mini Maker Faire - September 2012

Having replaced all the power supply capacitors, I showed Twitbeeb on the Bristol Hackspace stand at Brighton Mini Maker Faire 2012.

TwitBeeb at Brighton Mini Maker Faire 2012.

TwitBeeb at Brighton Mini Maker Faire 2012. Photo by Hollie Lubbock.

BBC B + Raspberry Pi

@twitbeeb
Tweeting from a BBC Micro powered by a @raspberrypi from the Brighton Maker Faire _ @aral :) #bmmf

Feed Toby

@FeedToby
Fed by @twitbeeb, got to feeder in 4.5secs yfrog.com/nvdo7yoj #FeedToby

Bristol Mini Maker Faire - March 2013

The next outing was the first Bristol Mini Maker Faire, with a few tweaks to the code to make it compatible with Ruby 1.9.

This happened:

TwitBeeb and Eben Upton at Bristol Mini Maker Faire 2013.

TwitBeeb and Eben Upton at Bristol Mini Maker Faire 2013.

BBC B + Raspberry Pi

@twitbeeb
Hello from Eben at Bristol Mini Maker Faire #mmfbrs

BBC B + Raspberry Pi

@twitbeeb
OMG! TWEETING FROM A BBC MICRO! #mmfbrs

Bristol Hackspace for BV Open Studios - June 2013

Between the last show and this one Twitter decided to close down their old API. So I had to scramble to basically rewrite my API code the day before this event.

Barney Livingston - @barnoid@mastodon.me.uk

@barnoid
This evening at @bristolhackspc I shall be mostly attempting to make @twitbeeb work again. Thanks, @twitter.

BBC B + Raspberry Pi

@twitbeeb
I have seen a 3D printer @bristolhackspc

BBC B + Raspberry Pi

@twitbeeb
hackspace drew me a son @bristolhackspc

Derby Mini Maker Faire - October 2014

I implemented some new features for this outing. When idle it now automatically reloads the tweets (previously someone had to press Escape to trigger this) and it cycles between tweets, a screen of self description and the Derby Mini Maker Faire logo.

JWS Young Engineers

@JWSYE
Using the @twitbeeb machine to tweet like its 1982! @MakerFaireDERBY #dmmf14 pic.x.com/F2LIP3vEXs

BBC B + Raspberry Pi

@twitbeeb
10 print "john is ace"; 20 GOTO 10 #DMMF14

BBC B + Raspberry Pi

@twitbeeb
hellmy name is james and i am epic and o i am good at football o no on i am to good #DMMF14

Bristol Mini Maker Faire - August 2015

On the Bristol Hackspace stand again at the second Bristol Mini Maker Faire. Swindon Hackspace had a lovely Teletype typing out tweets nearby, so people were able able to use TwitBeeb to send it messages.

Maker Faire Bristol

@MakerFaireBRS
Tweet a BBC B @twitbeeb or the @snhack Teletype today. Time travel by Twitter #bmmf15 pic.x.com/QybVjttZl0

BBC B + Raspberry Pi

@twitbeeb
THE BBC B ACROSS THE WALKWAY SAYS HELLO TO THE @snhack ASR-33. TOGETHER WE WILL RULE! #BMMF15

BBC B + Raspberry Pi

@twitbeeb
Welcome from Bristol Maker Fair. Banksy was here #BMMF15

Oh really?!?

There’s more!

David James Lennon has created a TwitBeeb twin using my code from Github! He will be showing it this Saturday (24th October 2015) at the RISC OS London show, which happens to be the same day the original TwitBeeb will be at Derby Mini Maker Faire.

His TwitBeeb tweets to @burrBeep. I’ve added a new tweet search page to the rotation that displays the result of a search for that Twitter handle. Hopefully we’ll be able to get some inter-show chats going.

I’ve added a few other nice features, including word wrapping for the tweet list. When I implemented word wrapping for Ode, my terrible poetry generator that I wrote on my BBC (the same one) when I was about 13, it consisted of about 120 horrible lines of BASIC. This time it’s basically just one regular expression. What a difference 20-odd years of experience and a computer science degree can make!

Taking TwitBeeb to shows has become easier over time as I’ve gradually improved its reliability. Nowadays it’s pretty much at the ideal point where once it’s connected to the network it can be left to its own devices. It’s nice to chat to people about it still though. What happens often at a Maker Faire is that a parent of about my age with small children in tow will spot TwitBeeb and say “Look kids! This is the computer I used at school!”. The children will look nonplussed and may attempt to poke and swipe things on the screen before mashing the keyboard. Meanwhile the parent realises that it’s actually showing real live twitter and asks how it works.

I expect I’ll continue to take TwitBeeb to events, as long as the Twitter API keeps working at least. I’d like to take it to the big Maker Faire in Newcastle next year, and maybe to EMF Camp 2016 as well, if I can keep it dry.

Another Update!

13/11/2017

Twitbeeb still hasn’t been to Newcastle (lugging a Cub monitor on the train doesn’t appeal).

Derby Mini Maker Faire - October 2015

Things went well in Derby.

BBC B + Raspberry Pi

@twitbeeb
Hello I am typing on an old computer. the display looks like ceefax. But I'm on twitter it is wierd. #DMMF15

BBC B + Raspberry Pi

@twitbeeb
hey hey @MJHibbett i tweet from a bbc micro #DMMF15

Mark Hibbett

@MJHibbett
Replying to @twitbeeb @twitbeeb Wow!

But in London it looks like there were problems similar to when I showed Twitbeeb at the Bristol Raspberry Jam in 2012.

Twit Twoo (BBC M128)

@burrBeep
Replying to @twitbeeb @twitbeeb hello twitbeeb #1! london is cold and grey. :( aall well in derby? psu issues here! #riscoslondon

Bristol Hackspace for BV Open Studios - April 2016

Another open weekend at the Hackspace.

BBC B + Raspberry Pi

@twitbeeb
TWEETING CEEFAX @bristolhackspc

Electromagnetic Field - August 2016

Twitbeeb did indeed go to EMF Camp and was installed in the bar. So I was able to keep it away from the weather, but I had to take measures to protect it from spilt beer. These involved resting the whole thing inside the lid of the plastic box I used to transport it (it fitted quite nicely), and attaching a sheet of acrylic to the side as a splash guard. I also made sure there were no flat surfaces to put pints down on nearby.

Again due to the bar location I decided to take further measures to protect followers of the @twitbeeb account by creating a new account: @emfbeeb.

I added several new features for EMF:

  • The current time displayed at the top right of the screen, à la Ceefax.
  • The regularly updated event schedule was available as a JSON file from a web server. So I added a screen to the rotation that displays the most imminently upcoming talks, workshops, etc. and their locations.
  • Two screens of EMF logos in Mode 7 graphics. I wrote code which reads an XPM file representing a screen of graphics and converts it to the stream of VDU commands that makes the BBC display that image. Due to the 4800 baud serial connection, the graphics scroll up from the bottom of the screen rather pleasingly.
Testing the EMF logo display.

Testing the EMF logo display.

Another feature I added this time that dramatically improved reliability: I drilled a small hole through the moving part of the Break key, through which I can insert a bent nail to prevent it being pressed. This stops people exiting to the Termulator menu, which puts it out of action until I’m available to fix it. The BBC Master has this feature in the form of a piece of nylon that can be rotated under the Break key.

Gavin Atkinson

@gavinatkinson
There's a BBC Micro on the bar you can send and receive tweets via the @emfbeeb account. I love #emfcamp. pic.x.com/lZHb9yhNXH

It seemed to go down well in the EMF bar.

EMF Beeb

@emfbeeb
EMF Camp is AWESOME!!! #emfcamp

EMF Beeb

@emfbeeb
my name is @JontyW #emfcamp

EMF Beeb

@emfbeeb
HOW DO THEY MAKE THE FIRE PONG ITS AWESOME HERE!!!!!!!!!!!!!!! #emfcamp

There was the expected amount of nonsense. Several of these:

EMF Beeb

@emfbeeb
never gonna give you up, never gonna let you down, never gonna turn around and hurt yo. never gonna ma #emfcamp

EMF Beeb

@emfbeeb
BBC Micro Model B machines suck! Amiga Rules! #emfcamp

That one is clearly nonsense.

In total 736 tweets were sent, despite Jonty asking for 1000 during the closing ceremony.

Finally:

EMF Beeb

@emfbeeb
.@barnoid's poem camera is definitely one of the best things at #emfcamp

I honestly didn’t send that one, but I will write it up soon.

Final Update

09/11/2024

Twitter is no more, so Twitbeeb is no more.

Before that happened it went to EMF again.

Electromagnetic Field - August 2018

Once again Twitbeeb was in the bar so it was tweeting to @emfbeeb.

EMF Beeb

@emfbeeb
I'm back! No capacitors popped yet. See you in the bar later. #emfcamp

EMF Beeb

@emfbeeb
TWEETING FROM A BBC AT EMF! THEY DON'T MAKE THEM LIKE THIS ANY MORE. Fortunately. Oh look I found caps lock #emfcamp

EMF Beeb

@emfbeeb
how to make the AT symbol on an old bbc micro? #emfcamp

There’s a key that does @ and only @!

EMF Beeb

@emfbeeb
Everyone loves the BBC Micro! #emfcamp

EMF Beeb

@emfbeeb
MELON MELON MELON #emfcamp

There was a lot of MELON.

At the end of Sunday night I was presented with this:

Barney Livingston - @barnoid@mastodon.me.uk

@barnoid
People in the @emfcamp bar last night. Look what you did. I hope you're proud of yourselves. #emfcamp pic.x.com/NLeNrpv9XU

There were a couple of mildly unsavoury tweets that I had to delete then the account was restored.

EMF Beeb

@emfbeeb
SEE YOU IN TWO YEARS1 #emfcamp

Ah, about that…

Electromagnetic Field - July 2020?

Didn’t happen, due to the pandemic.

To observe the days that it would have happened, I set up an AI “simulation” of the bar at EMF. I trained a GPT2 on the previous tweets of @emfbeeb, selected a batch of the best generated results, and tweeted them on @emfbeeb around times the bar would have been open.

Barney Livingston - @barnoid@mastodon.me.uk

@barnoid
It's taken a while but I now have an almost perfect simulation of the @emfcamp bar, complete with AI people and a BBC B for them to tweet from!

EMF Beeb

@emfbeeb
The bar is closed. No, wait. No, wait, no. #emfcamp


For a bit of extra fun I was pretending there were simulated people.

EMF Beeb

@emfbeeb
HOW CAN EMF BE REAL IF OUR EYES AREN'T REAL? #emfcamp

EMF Beeb

@emfbeeb
Had a wonderful meal and beer at barnoid. Thesaurus. tiddler's hand.

And that they were working out how to escape from the simulation.

Barney Livingston - @barnoid@mastodon.me.uk

@barnoid
Ha ha, it's like they're figuring it out!

EMF Beeb

@emfbeeb
holodeck


EMF Beeb

@emfbeeb
never gonna be, never gonna bbc micro #emfcamp

EMF Beeb

@emfbeeb
help emf im stuck here forever #emfcamp

EMF Beeb

@emfbeeb
NEED A MELON FROM THE BAR? WILL I ! #emfcamp

Barney Livingston - @barnoid@mastodon.me.uk

@barnoid
Hmm, that's weird...

EMF Beeb

@emfbeeb
sentient, talk to me one!


EMF Beeb

@emfbeeb
HELLO FROM A COMPUTER WHERE EVERYTHING IS DRUNK

Barney Livingston - @barnoid@mastodon.me.uk

@barnoid
The logs show something's not quite right in the simulation. I'm trying to fix it.

EMF Beeb

@emfbeeb
Hello, everyone. We are people.


EMF Beeb

@emfbeeb
Eat Algorave if you are hungry!!

Barney Livingston - @barnoid@mastodon.me.uk

@barnoid
Ah, they weren't supposed to be able to find that command. Not sure what happened there.

EMF Beeb

@emfbeeb
*COMPUTER END PROGRAM


Barney Livingston - @barnoid@mastodon.me.uk

@barnoid
Replying to @barnoid Once again the EMF bar broke Twitbeeb, this time from inside a simulation.

Barney Livingston - @barnoid@mastodon.me.uk

@barnoid
Replying to @barnoid I'm not sure where all the AI hackers have got to now. I might need to wipe this computer.

The End

EMF returned in summer 2022, around the time Elon Musk was in the process of buying Twtter, then proceeded to scupper the API. So Twitbeeb did not return. I’d moved on to telephones haunted by David Lynch by then anyway.

That’s it for BBC Micros tweeting. I have a potential idea for a future anachronistic technology mix-up, we will see.