Javascript

Javascript

javascript
javascript

How to bridge the gap between a visitor's phone and the Particle Cloud (which controls the display): Javascript. 

JavaScript is a programming language that adds interactivity to websites. 

It was invented by Brendan Eich, co-founder of the Mozilla project, the Mozilla Foundation, and the Mozilla Corporation. He created it in ten days, in 1995, when he was working at Netscape. 

So a good place to start to figure it out: the JavaScript Basics page on the Mozilla Developers Network.

Reading in the above, I can see that a significant part of the JavaScript code I'm using consists of variables, which are containers that you can store values in. 

var moveItFunctionName = "moveit";

and 

var http = new XMLHttpRequest();

And all these variables (I counted 5) are collected inside a function.

I expected to have to figure out much more about JavaScript, in order to create an easy connection between phones and my display, but two developments altered my learning curve:

1. The coding expertise at Cambridge Hackspace. Many, many members of CH are software people who are there because they are interested in experimenting with hardware. So JavaScript comes easy to them. I didn't get far on my own, before helpful neighbors filled in the blanks. 

2. It turned out (and this is getting ahead of the story) that phone-to-display connectivity is not much in demand. Very few people are motivated to try to control a public displays with a phone.

I'll go into this in detail further on, but let's just leave it at: JavaScript is probably what you want if you want to bridge that gap between a website on a phone and a physical device; and, it may not be worth the work because it's not something that people are generally excited about enough to use it. 

In the meantime, let's move onto the prizes, which also turned out to be... a learning experience. 

Previous -- Facebook

Next - A Game, with Prizes