- Code the Arduino to work as needed.
- Build the REST server to interface with the Arduino board with Ethernet Shield.
- It must implement defined interfaces for each sides : Client & Arduino.
- Create client (iOS & JQuery) to work with the server
- The server handles requests from the client, from URL or POST data ;
- It firstly checks those requests and builds the appropriate JSON object ;
- It secondly sends those JSON objects trought TCP to Arduino, and waits for the answer (JSON object) ;
- It finally sends back the answer to the client.
=> The client use the provided API to interact with the Arduino
We've choosen to separate the server's functionnalities in 3 different 'Layers' :
- web.js : handle web request ;
- metier.js (formaly 'service.js') : build JSON from request ;
- dao.js : Arduino registration & communication ;
The interfaces :
- Interface between REST Server / Arduino :
To Document
- Interface between REST Server / Client Server (public API):
- The REST server receive request by URL or POST, like this:
http://ip:port/server-restServer/arduinos
http://ip:port/server-restServer/arduinos/cmd_id/arduino_ip/
(POST, sending JSON in body)
Written by Baptiste Gauduchon and Yann Jajkiewicz, designed for a project in our last year of engineering school.
ISTIA Ei5 AGI 2013-2014