Raspberry Pi + Google Coder = HTML + CSS + JS + node.js = Way cool.

Turn your Raspberry Pi into a powerful, free, open source, Web-based development platform


So, you’ve got your brand new Raspberry Pi 3 and you can’t wait to get programming but arghhhhh! So many choices and most of them are kind of complicated and messy if you want to build useful apps with Web interfaces. Even if you’re pretty familiar with programming languages and Linux, building apps on your desktop then uploading them to your RPi and testing followed by wash, rinse, repeat gets a little tedious. But I have a solution: A programming platform that is not only simple to implement but it’s also completely web-based: Google’s Coder.

[UPDATE] Reader Sven Trümper just told me that Coder doesn't work on the RPi3 or the Pi Zero and I realized that when I tested Coder, I'd grabbed an RPi 2. My apologies to anyone who tried to get Coder to work on an RPi 3 or Pi Zero. I 

First released in September 2013, Google Coder is a free, open source coding platform for HTML, CSS, and JavaScript built on Raspbian (that’s Debian implemented for the Raspberry Pi) running node.jsThis is not only a really technically interesting platform, it's also very slick. When I installed Coder, from the end of the download to having it up and running on the Raspberry Pi and displayed in my browser took less than five minutes.

After you unzip the download (v0.9 is 1.33GB)  you find the installer (written in Python) for OS X will install the operating system to a 4GB (or larger) micro SD card with a minimum amount of aggravation. If you’re using Windows, it’s a little more complicated. Once you’ve created the micro SD card, inserted it in the RPi, and powered up, if everything goes as it should, you’ll then fire up your browser and, on OS X, point it at “http://coder.local”. On Windows  you’ll have to first install Apple’s Bonjour Print Services for Windows for this to work. Alternatively, if you know the DHCP address allocated to the RPi you can simply browse to that location. 

Note that the RPi can also connect to your network via the wireless interface which is covered on the Coder website but it’s much easier to install via a wired connection and then configure the RPi to use Wi-Fi in the Coder configuration screen. 

Whether you use a wired or wireless connection, here’s what you’ll see in your browser:

coder 0 1

Click on “Advanced”:

coder 0 2

… then click on “Proceed to coder.local (unsafe)” and enter a password:

coder 0 3

When Coder is running on your Pi here’s what you see after you’ve completed the first time setup:

coder 1 0

And, finally, after logging in:

coder 5

The first panel is to start a new project and the other panels are existing projects. Here I’ve opened the Eyeball program. 

coder 7

Clicking on “Coder” in the widget at the top right will take you back to the home screen while the “</>” will open the editing environment:

coder 8

In this screen you can modify the HTML, CSS, and the JavaScript driving the current program as well as configure node.js. The other controls include returning to the program output display only (the folder icon), displaying the editor interface alongside the live program (the eye icon and, yes, making then saving changes immediately updates the running program so you can test modifications as you make them), and changing the project settings (the gear icon) ...

coder 7

The Coder site provides a few simple program that demonstrate various techniques and features of the environment. To add these to your Coder installation download the example's ZIP files and then in the Coder main screen click on the green panel with the plus sign. You'll see ...

screen shot 2016 04 02 at 3.03.16 pm

Click on the button with the up arrow, select the ZIP file you want to upload, and click open; the example program will be installed and opened.

Now, back to the Raspberry Pi: You’ll find when Raspbian boots up you can’t login at the command prompt. This is because whatever the credentials are for this version, it’s not the standard user name “pi” with the standard password “raspberry” ... but there is a solution; SSH to the IP address of the Raspberry Pi as the user “pi@coder.local” (the command is “SSH pi@coder.local and you’ll see:

The authenticity of host 'coder.local (' can't be established.

ECDSA key fingerprint is SHA256:9+7ZWr2l6eAiqCPEyWxHkiUTykC81pldCb8eSD3GSHo.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'coder.local,' (ECDSA) to the list of known hosts.

pi@coder.local's password:

At this point you enter the password you set in the first run of Coder …

Linux coder 3.18.7-v7+ #756 SMP PREEMPT Wed Feb 18 16:14:51 GMT 2015 armv7l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.

Last login: Sat Feb 21 06:27:55 2015

pi@coder~ $ sudo passwd root

Enter new UNIX password: 

Retype new UNIX password: 

passwd: password updated successfully

pi@coder/~ $ 

Now you can login to the Raspbian console as “root” with the password you selected and typing “startx” at the command prompt will launch the GUI environment.

So, now you have full access to the Raspbian console on the RPi, remote access to the RPi via SSH, and to Coder via your Web browser. As a learning platform it’s outstanding and the potential for teaching computer fundamentals is fantastic. In fact you can have multiple windows open to a single coder instance and have them each creating and executing different programs which makes one RPi into an amazingly cost-effective tool for multiple students.

If you think up something interesting to do with Coder let me know and we’ll hand you fame and fortune on a plate. Happy Coder-ing!

Comments? Thoughts? Suggestions? Lay some feedback via email on me or comment below then follow me on Twitter and Facebook.


Copyright © 2016 IDG Communications, Inc.

The 10 most powerful companies in enterprise networking 2022