Version 1.1.1
aREST UI is an embedded UI for the aREST framework. Currently works with the Arduino Mega & Arduino Due with the CC3000 WiFi chip, the WiFi shield, and the Ethernet shield. It works as well with the Arduino Zero with the WiFi 101 shield, and with the Arduino MKR1000 board.
It also works with the ESP8266 WiFi chip.
If you want to know more about aREST, go over to http://arest.io/.
To use the library with Arduino boards you will need the latest version of the Arduino IDE:
You will also need the aREST library:
To install the library, simply clone this repository in the /libraries folder of your Arduino folder.
http://arduino.local
http://wildfire.local
You can simply create an instance of aREST UI with the following command:
aREST_UI ui = aREST_UI();
If you don't want to run with the default title, set your own for the UI.
ui.title("Your title");
Buttons are used to control the state of a digital output pin. The command creates two button inside the interface, one 'On' button, and one 'Off' button. For example, the following command creates a pair of buttons to control pin number 6:
ui.button(6)
The slider command creates a slider to control a pin via PWM. For example, it can be used to control the intensity of a LED connected to this pin. The following command creates a pair of buttons to control pin number 6:
ui.slider(6)
;
Labels are used to display the value of variables inside the interface. Before you can use this command, you need to create the corresponding variable first. The following command declares a variable called temperature:
ui.variable("temperature",&temperature);
After that, you can use the following command to create the corresponding label inside the interface:
ui.label("temperature")
;