Ever wanted to walk up to any machine and be able to control it from your smartphone, without an app? Well, the physical web is making this a reality. It uses Bluetooth LE devices to broadcast out beacons that contain a URL for the object you're standing in front of, allowing you to access it directly from your smartphone, no app required.
This candy machine is a demonstration of the technology. We bought an off-the-shelf candy dispenser and replaced the control circuit with a Particle Core. Previously, it used IR to detect if you waved your hand in front of the machine. Deciding that was no fun, we used a Particle Core with a Spark.function call to turn on the motor and LED for 2 seconds. This allows us to control the candy machine from the internet easily.
But while having control from the internet is fun, we wanted it to be super easy for anyone to get candy, without needing an app or having to know a website. So, we took a bluz board and set it up as an Eddystone URL beacon. This allowed the device to publish out its URL for anyone who came up to it.
Google Chrome on iOS now supports physical web beacons from the Today screen, meaning you just swipe down on your iPhone and can see any of these objects around you. For our case, we just pointed people right to a website with one big button that, when pressed, calls the function on the Core and dispenses the candy.
Once we were finished, it is easy for anyone with an iOS device and Chrome to walk up, get the URL, click on the button and get their candy!