Search Code
About GSL_09-HttpServer-RPC-Funcs_Servos

First published 27 Oct 2011, with 2 revisions since.
Last update: 27 Oct 2011.
View history

Last change message: N/A

Import this program

GSL_09-HttpServer-RPC-Funcs_Servos

Published 27 Oct 2011, by   user Nelson Neves   tag camera, geeksessionlab, get, http, motor, pan, position, rest, rpc, Servo, tilt, webinterface

Summary of GSL_09-HttpServer-RPC-Funcs_Servos

How to get this program

Import this program

Open this program in the mbed Compiler, where you can edit it and compile it for your hardware.

Download as .zip

Download this program as .zip file.

Libraries included as part of GSL_09-HttpServer-RPC-Funcs_Servos

RPCInterface
Library to provide a mechanism to make it easier to add RPC to custom code by using RPCFunction and RPCVariable objects. Also includes a class to receive and process RPC ...
tag rpc
Servo
A class to control a model R/C servo, using a PwmOut
tag PwmOut, Servo

Description

Code to demonstrate how to map 2 RPC functions to command 2 servo motors via REST HTTP Get request.

Pretty useful to control a webcam PAN and TILT position when using Servos in this support: http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=470&osCsid=j90j5kqfegquksdbumahtmuqg5

There is also a servo.html file to test some HTML5 slider RANGE object to set the Servo position and make the Http Get request via AJAX (asynchronous JavaScript call)

Note: Demo program to be used on the GeekSessionLab Talk (November 2011). http://devrendezvous.com/?lang=en

Code

main.cpp [code]
servo.htm.cpp [code]