Raspberry Pi 3: A Cheap Desktop Computer for Children Learning to Program in BASIC
In the early 2000's, parents began noticing that educators were no longer interested in teaching their children about computers in ways that would lead them to get excited about pursuing computer-related careers like computer science and computer engineering. The problem was explained in a famous 2006 essay by the well-known astrophysicist and science fiction writer David Brin, Why Johnny can't code. As the essay mentions, Brin could not find a modern computer and modern software capable of teaching children the BASIC computer programming language at a level they can understand. So, he solved the problem by buying a used computer from the 1980's that came with BASIC already installed.
As you may be aware, prices of used computers from the 1980's have risen significantly since 2006, so that is no longer the cheapest option. Fortunately, another response to the problem was the creation of the Raspberry Pi Foundation, which was established in 2009 to promote the study of computer science in schools by providing the low-cost line of Raspberry Pi computers. The goal was to enable even lower-income children to learn fundamental computer coding skills. Then, computer hobbyists discovered that Raspberry Pi's make excellent project computers, and they began building all sorts of things with them, from musical instruments to retro gaming computers to web servers.
I have noticed that prices of used Windows computers have risen on Ebay over the last few months. Although difficult to quantify, my guess is that the prices of the least expensive, but still useful, used computers have increased by something like 50%. Whereas one could have bought a useful used laptop for $50 a year ago, they are now selling for around $75. On the other hand, with improvements that have come over the years, the lowly Raspberry Pi 3 has become a "useful" computer. I put "useful" in quotes because Raspberry Pi 3's are useful in a wide variety of applications that do not require a large amount of computing power. Despite the recent rise in price at the low end of used computers, Raspberry Pi 3 and 4 computers can still be purchased for $35 (around $50 to $60 on Amazon with case and power adapter). This makes the Raspberry Pi the cheapest option for those who are looking for really cheap, yet useful, computers.
An additional benefit of using a Raspberry Pi 3 or 4 for surfing the Internet is the ability for the first time in several years of surfing on a new computer without worrying about being spied on by the Intel Management Engine (ME) or AMD's Platform Security processor (PSP). The absence of spying hardware on a new computer is a rather big deal for those of us who value our online privacy. Of course, we still have to worry about our ISP's and VPN's spying on us, but at least we now have the option of buying inexpensive hardware that is not potentially watching our every keystroke.
Given the developments mentioned above, I thought it might be fun to see just how well a Raspberry Pi 3 can be made to work as a general-purpose computer. I also wanted to see if it can be used as a platform for a novice to learn BASIC. I know I am not the first to try using a Raspberry Pi 3 as a desktop computer. Many have tried with Raspberry Pi 3's and found them to be a little too slow to be worthwhile. However, my experience with turning a now 14-year-old Dell Inspiron E1505 laptop into a useful computer for surfing the Internet reminded me that the secret to this is using the right software. I could have experimented with a Raspberry Pi 4, but since I already had an extra Raspberry Pi 3 lying around, I decided to see if I could use it along with modern or semi-modern software to accomplish my goal. Any software that works on a Raspberry Pi 3 should run even faster on a Raspberry Pi 4, which has about three times the processing power.
Picking an Operating System for the Raspberry Pi 3
Several operating systems have been developed specifically for Raspberry Pi's.
This is the version of Raspberry Pi OS that comes with a bare bones desktop GUI. The version of the ISO file with the recommended software is more than twice as large, so I passed on it. A link to a set of installation instructions can be found on the Raspberry Pi OS download page, so I will not repeat them here. From the GUI menu of the Raspberry Pi OS version that I installed, the following programs can be accessed: the Chromium browser, the VLC player, an image viewer, the Raspberry Pi configuration program, the Geany programming IDE, a file manager, a simple text editor, a handful of utility programs, and that is about it. And of course, you can access many more via the Linux command line.
The first thing I did after booting up was to allow the OS to update automatically to the latest version. This took nearly an hour on my rather slow Internet connection. No additional "recommended" software was added during the update, so the programs accessible through the GUI menu did not change. Afterwards, the operating system took up about 3.2 GB of space on the micro USB flash card.
Exploring the Raspberry Pi 3 as a Desktop Computer
At this point, I wanted to see what I could do with what I now had. First, I tried playing some audio and video files with the VLC player. I found that MP3 audio and 1280x718, H264 MP4 video files played without problems at my monitor's native resolution of 1920x1080. I did not try to play a DVD because DVD's contain MPEG2 files, and I have not bought the license for decoding MPEG2 files on the Raspberry Pi's hardware.
Surfing the Internet in version 78 of the Chromium web browser was a little slow, and the browser took 180 MB of the 952 MB of available RAM just to boot up. So, I decided to look for a browser with lower RAM requirements. I installed the text-only Lynx browser from the Raspberry PI OS repository with the "sudo apt-get install lynx" command. Note that Lynx supports SSL but not JavaScript. As I expected, navigating around in Gopherspace using Lynx on the Raspberry Pi 3 is super fast. It is also fast on regular websites. By the way, in my admittedly biased opinion, you cannot really call yourself a geek until you have tried shopping on Amazon in text-only mode.
Netsurf and Seamonkey are two web browsers that have been around practically since the dinosaurs roamed the earth. Okay, at least since the mid 2000's. Unfortunately, I could not get either to install from the Raspberry Pi repository using the "apt-get install" command. The error messages said apt-get did not recognize either package.
For those who are unfamiliar with the term "repository", every modern Linux distribution of which I am aware comes with an associated repository. For the purposes of this article, think of a repository simply as a location on the Internet where software is stored that is compatible with a particular Linux distribution. Users can download any software they want from a repository using a "software manager", a "package manager", or the "apt-get" or similar command. And, every bit of software in a repository is free! Take that Microsoft--smack! You can also tell your Linux computer to look for software in other repositories, if you choose.
Rather than locating a Debian package file for either of the above-named browsers (Raspberry Pi OS is a derivative of Debian 10 Buster), I used "sudo apt-get install midori" to install the Midori web browser (version 7.0, 2018). I noticed Midori tied up something like 60-80 MB of RAM per open tab, so you can't have too many browser tabs open at the same time, given that the Raspberry Pi 3 only has 1 GB of RAM. I found that web pages are slow to load in Midori. It also froze my Raspberry Pi 3 on one webpage. Possibly, Midori ran out of RAM? Here are some representative webpage load times for Midori on the Raspberry Pi 3:
Webpage Load Times for the Midori Web Browser
Webpage Time to Load (Sec)
google.com 3
amazon.com 2 (mobile mode only)
ebay.com 17
reddit.com over 120
nytimes.com 85
tilde.news 5
voat.co 8
walmart.com 30
cheapskatesguide.org 2
Note that webpage load times are only approximate. I did not load the same webpage multiple times and average the results. I just wanted to get a general feel for the speed of each browser that I tested for this article. So, you may conceivably see somewhat faster page load times. Also, I am on a rather slow Internet connection, so those who are lucky enough to live in areas with faster Internet services may see slightly faster page load times.
I noticed something interesting while I was testing Midori. Amazon serves the mobile version of its website to the Midori browser, so Amazon thinks Midori users are on cellphones. That is nice if you want to conserve data usage. Unfortunately, even though the home page of Amazon.com loaded quickly in Midori, it was basically unusable. Searching for Amazon products using Midori takes longer than even I am willing to wait.
For comparison, here are the load times for version 78.0.3904.108 (32-bit) of the Chromium browser that comes with the Raspberry Pi OS:
Webpage Load Times for the Chromium Web Browser
Webpage Time to Load (Sec)
google.com 6
amazon.com 13
ebay.com 10
reddit.com 25
nytimes.com 28
tilde.news 5
voat.co 7
walmart.com 8
cheapskatesguide.org 2
Version 3.0.5-5 of the Dillo web browser also comes with the version of the Raspberry Pi OS distribution that I downloaded, but for some reason, it does not appear in the GUI Menu. You have to type "dillo" in a terminal window to bring it up. Dillo does not support (or download) Java or Javascript, so those pages that will load without JavaScript often load faster.
Here are the webpage load times in the Dillo browser on the Raspberry Pi 3:
Webpage Load Times for the Dillo Web Browser
Webpage Time to Load (Sec)
google.com 2
amazon.com 12
ebay.com 6
reddit.com Does Not Load (DNL)
nytimes.com 10
tilde.news 2
voat.co DNL
walmart.com 6
cheapskatesguide.org 2
Shopping on Amazon in Dillo is actually not a horrible experience. Many of the product pictures are not visible, but you can see the text descriptions and user reviews. I did not try to log in and actually buy anything. That may not be possible without JavaScript. By the way, those of you who hate the pink backgound on Cheapskate's Guide will appreciate that it is tan in Dillo. Actually, tan looked pretty good to me too ... hmmmm...
I think this exercise has given me a newly-found respect for Dillo. I first tried it around 2003, but the only thing I could get it to do consistently was crash. However, it did not crash once while I was testing it for this article. Wikipedia says the latest stable version of Dillo is five years old, but it also implies that Dillo is still being actively developed. At least, it does not say Dillo is no longer being developed. This is probably the web browser that I would use for surfing the Internet on the Raspberry Pi 3. I would switch to the Chrome browser for pages that require JavaScript.
The bottom line is that frequent Internet users will think that surfing on a Raspberry Pi 3 is too slow. Those who only surf occasionally and are reasonably patient may not have a problem with using the Raspberry Pi 3, especially with Lynx or Dillo. I also think a Raspberry Pi 3 or 4 in a sturdy computer case may make a decent first computer for a child, especially a child whose parents cannot afford to spend much on a computer.
The easiest way for novice users to install new software on a Raspberry Pi running Raspberry Pi OS is with the package manager. It can be reached from the main menu under preferences/"Add / Remove Software". Unfortunately, the package manager is slow, and it only works some of the time. For example, I tried installing eight other web browsers from the Raspberry Pi OS repository via the package manager (Elinks, Firefox, Conkeror, Chimera, Hv3, Links, Links2, and Arora). Only two would install from the package manager. Two more installed using the "sudo apt-get install" command. Between the two installation methods, I managed to install Elinks, Hv3, Links, and Arora. Links and Elinks appeared to work as they should. Hv3 would load and go to a webpage that I chose, but after that, it only gave error messages. The Arora web browser ran, but it apparently did not have any SSL certificates. Every time I visited a new page, it asked me to accept an SSL certificate for that page. This kind of behavior is typical of most Linux distributions. This is why I tend to stay with the major Linux distributions like Linux Mint that have made an effort to remove the typical bugs found in other Linux distributions.
Setting Up the Raspberry Pi 3 for a Child to Learn to Program in BASIC
Now, we will install an easy-to-use BASIC interpreter. Nearly all Linux distributions that I know of come with the gcc "C" compiler. You can also code on the Raspberry Pi in C++, python, PHP, JavaScript, and Ruby by installing the right Linux packages and using the Geany IDE or another integrated development environment. However, in my opinion, these languages are too advanced for children. Ideally, children should start with the BASIC language. Unfortunately, I could not find a BASIC interpreter in the Raspberry PI OS repository, so I went looking for one elsewhere.
I found articles on the Internet from 2012 that said MMBASIC and Tiny BASIC run on the Raspberry Pi, but it took me a while to locate one. I finally found a Linux-compatible version of MMBASIC here.
The MMBASIC website is https://mmbasic.com . It has a downloadable version of MMBASIC that runs in DOS, but not one that runs in Linux.
To run MMBASIC, you will first need to install the libncurses.so.5 library file and some other dependencies using this command:
sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev
After I installed and ran MMBASIC, it just gave me this error messages over and over again:
gpioTick: pigpio uninitialised, call gpioInitialise()
Luckily, I found from this page of the Raspberry Pi forum that you have to use the "sudo" command with MMBASIC. From there, it was a snap. I created a file called "basic-example.bas" using the vi editor and wrote the simplest BASIC program I could think of into it:
for i=1 to 10
print i
next
Then, I started up MMBASIC from the Linux command line with this command:
sudo ./mmbasic
If you are totally unfamiliar with Linux, be aware that for this command to work, you have to be in the directory where the MMBASIC program is located. The "./" in the above command literally means "from the directory you are now in".
The MMBASIC program comes up in the command line mode, and all you see in the Linux terminal window is this:
Linux MMBasic Version 5.4.05
Copywrite 2011-2017 Geoff Graham
Copywrite 2017 Peter Mather
The ">" is the MMBASIC command prompt.
At the ">" prompt, I typed this command:
run "basic-example"
At this point, my simple "basic-example.bas" program ran and produced the expected output (it counted from 1 to 10 on the screen). When you are done, you can shut down MMBASIC with the "quit" command (without the quotes).
With a Raspberry Pi 3 running MMBASIC and a BASIC manual (pdf), you can teach your child BASIC! Be aware that several versions of the BASIC programming language exist, so the manual may not exactly match the MMBASIC interpreter. Apparently, no manual for MMBASIC exists, but I did find this statement on the MMBASIC website:
"MMBasic was designed to mimic the original Microsoft BASIC (also known as MBASIC, BASICA or GW-BASIC) which was supplied with the Tandy TRS-80, Commodore 64 and the early IBM personal computers.
In addition MMBasic supports many modern structured programming constructs. These constructs and most of the language substantially meets the specifications in the ANSI Standard for Full BASIC (X3.113-1987) or ISO/IEC 10279:1991."
A very old BASIC programming manual can also be found here (pdf).
Final Words
I discovered that with the right software, the Raspberry Pi 3 can be turned into a passable general-purpose desktop computer on which a child can learn the BASIC programming language. So, if you have a child that does not have a computer, and you cannot locate a used Windows computer in your price range, you may want to consider the Raspberry Pi 3 for $50 to $60 with case and power adapter on Amazon. Even better for the same price would be a Raspberry Pi 4 with 1 GB of RAM. Still better would be a Raspberry Pi 4 with 2 or 4 GB of RAM for a few dollars more. A USB mouse and a USB keyboard can be found at many thrift stores for less than $10. Any TV with an HDMI port should work as a computer monitor. You will also need an 8 GB or larger microSD card, preferably a high-speed one, and an HDMI cable. Hopefully, you already have both. The Raspberry Pi 4 has two micro HDMI ports, so you will also need a micro-HDMI-to-HDMI adapter to use it.
By the way, just in case I did not make it clear, if you are considering buying a Raspberry Pi computer for your child, be aware that nearly all of them come without any kind of operating system. So, in order to get a Raspberry Pi to work at all, you will have to install an operating system onto a microSD card. This means you will need access to a Windows computer and the Internet for about an hour.
If your child has ongoing access to a Windows computer, you may prefer to download and try the DOS version of MMBASIC from the MMBASIC website.
I will throw in an additional piece of advice for every parent whose child displays a keen interest in computers and technical things in general. Go for a 2 or 4 GB Raspberry Pi 4 over a similarly priced or slightly more expensive, used Windows computer. If your child has the interest and the patience, he or she will receive much more useful knowledge about computers from the Raspberry Pi 4. If you decide to go the Raspberry Pi route, involve your child in the entire process from buying the Raspberry Pi up to the point of typing in the first basic program. This is an important part of the total educational process.
One last important point that I should mention is that paying more for an expensive computer will not improve your child's educational experience. In fact, I own much of the knowledge that I have acquired over the years to being too cheap to buy expensive computers and software. The desire to avoid paying for expensive computers motivated me to learn how to build my own. It has also motivated me for the last two decades to learn as much as I can about Linux. And, it has caused me to learn about self-hosting web servers from home and optimizing their performance for slow Internet connections. As they say, "necessity is the mother of invention". Invention is a learning process that you want your child to be engaged in, not simply learning to poke an icon on a $1000 Ipad.