Git Product home page Git Product logo

arest_ui's Introduction

aREST_UI Build Status

Version 1.1.1

Overview

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/.

Contents

  • aREST_UI.h: the library file.
  • examples: several examples using the aREST UI library

Requirements

To use the library with Arduino boards you will need the latest version of the Arduino IDE:

You will also need the aREST library:

For WiFi using the CC3000 chip

Setup

To install the library, simply clone this repository in the /libraries folder of your Arduino folder.

Quick test (WiFi)

  1. Connect a LED & resistor to pin number 6 of your Arduino Mega board
  2. Open the WiFi_CC3000 example sketch and modify the WiFi SSID and password
  3. Upload the sketch to the board
  4. Go to a web browser and type http://arduino.local
  5. Click on the 'On' button and the LED should turn on

Quick test (WildFire)

  1. Connect a LED & resistor to pin number 6 of your WildFire board
  2. Open the WildFire example sketch and modify the WiFi SSID and password
  3. Upload the sketch to the board
  4. Go to a web browser and type http://wildfire.local
  5. Click on the 'On' button and the LED should turn on

API documentation

Create aREST UI instance

You can simply create an instance of aREST UI with the following command:

aREST_UI ui = aREST_UI();

Title

If you don't want to run with the default title, set your own for the UI.

ui.title("Your title");

Button

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)

Slider

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);

Label

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");

arest_ui's People

Contributors

fabaff avatar ivankravets avatar marcoschwartz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.