It might be better to use a message broker with MQTT to receive messages instead of running a HTTP server. Since Arduino is single threaded running a HTTP server in it might cause problems.
On Tue, Aug 4, 2015 at 6:19 PM, Shabir Mohamed <[email protected]> wrote: > Hi, > > I've written an Arduino Agent to connect and push device data > (Temperature, Bulb Stats and etc) to our IoT platform. You can find the > code at [1] > > The Agent connects to the internet via a wifi-shield mounted on top of it. > A similar version of the same has been written for ethernet-sheilds as well > [2]. > > The agent basically has two components: > > * 1. PushClient* > * 2. HttpServer* > > The *PushClient* connects to our IoTPlatform and pushes device data at > pre-set time intervals. > The *HttpServer* is initialised at startup and is continuously checked > for any incoming messages in the loop() method of the arduino. The purpose > of the HttpServer is allow control signals (ex: switching a bulb or buzzer) > to be sent to the Arduino. > > Your comments as to how we could improve this implementation is highly > appreciated. > > [1] > https://github.com/wso2-dev/device-cloud-agents/tree/master/FireAlarmWifiAgent > [2] > https://github.com/wso2-dev/device-cloud-agents/tree/master/FireAlarmEthernetAgent > ------------------------------------- > *Shabir Mohamed* > *Software Engineer* > WSO2 Inc.; http://wso2.com > Email: [email protected] <[email protected]> > Mobile: +94 77 3516019 | +94 71 6583393 > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Imesh Gunaratne* Senior Technical Lead WSO2 Inc: http://wso2.com T: +94 11 214 5345 M: +94 77 374 2057 W: http://imesh.gunaratne.org Lean . Enterprise . Middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
