A new British computer that costs just £22 went on sale at 6am on Wednesday morning – and immediately sold out, crashing the websites selling it in the process.

The Raspberry Pi is intended to inspire a new generation of schoolchildren to learn to program, just as the Sinclair Spectrum and BBC Micro did in the 1980s, which led to the burgeoning UK games sector.

As small as a credit card, the first versions of the Raspberry Pi, which are being sold through the components companies RS and Farnell, are intended to go to developers who will then write software that people can use to write their own programs.

The ideal, says Eben Upton, the founder of the charity behind the scheme, is to give one away to every child as they reach a new school year so that they can do their own programming and learn to control computers, rather than be controlled by them.

The devices have a USB port for a keyboard, Ethernet port, SD card slot, and an HDMI port for video output. Users will have to supply their own keyboard and screen, or plug it into a TV set.

At its heart is an ARM chip, like that found in mobile phones and tablets, and it runs a version of the free open-source operating system Linux found in many web servers and in Android smartphones.

The idea came from David Braben, a video game veteran who wanted to find a way to inspire young users to program just as the Spectrum and BBC Micro did.

For those who had awoken especially early but found the websites at RS and Farnell had crashed, the experience was frustrating: "This is what it feels like to be a middle-aged woman who wants Take That tickets," quipped Matthew Green on Twitter pondering the crashed site.

Raspberry Pi is a charitable foundation set up by Upton, a Cambridge-based engineer, who says that he got the idea about five years ago when he found that applicants for degree course places: "[didn't] seem to know enough about what a computer really was or how it worked… I found it worrying."

He explained that: "What was needed was a return to an exciting, programmable machine like the old BBC Micro; and it had to be affordable, say around £20, so every child could potentially have one."

The Raspberry Pi has gone through a number of prototypes. This shows its video out capability

And its web browsing capability