An IoT Open Project


The following files are simple examples of how to control your Arduino from a JavaScript code running on the Browser side. The main goal of these examples is show you an easy and quick way to implement useful systems that can be controlled from a mobile device (Smartphone / Tablet) or PC .

NearBus JavaScript Examples

Hello World - This example shows the required code to write a Digital value and to read an analog value on a remote device running NearBus


Blinking LED - This simple example shows how to implement an infinite loop in the JavaSript code running on a Browser


Remote Control - This example shows a simple interface (designed to mobile devices) that allows you to turn on and to turn off the 4 digital outputs supported in the VMCU mode


Temperature Controller - This JavaScript code (running from a browser) will allows you to implement a simple control loop to maintain the room temperature at the set point


Complex Controller - This JavaScript example is intended to show you how to implement a real application using the NearBus system. The example is based in coffee machine system which has a good level of complexity to understand how the NearBus system works. (edit the .html file to see the code explanation)


Mobile Gauge - This JavaScript example show how to implement a gauge indicator adapted for mobile devices. The code implements a single gauge that shows in real time the ADC value in Port_0 (Arduino A0). The value is escalated by a factor of 1/10.