Dust Sesnsor PMS5003
Dependencies: DustSenzor NetServices ThingSpeakEthernet mbed
Fork of PMS5003 by
main.cpp
- Committer:
- segundo
- Date:
- 2010-11-09
- Revision:
- 0:2419d81ee03d
- Child:
- 1:57f922fe8fb5
File content as of revision 0:2419d81ee03d:
#include "mbed.h" #include "EthernetNetIf.h" #include "HTTPClient.h" EthernetNetIf eth("mbedSE"); HTTPClient http; int main() { printf("Setting up...\n"); EthernetErr ethErr = eth.setup(); if (ethErr) { printf("Error %d in setup\n", ethErr); return -1; } printf("Connected ok, IP : %d.%d.%d.%d\n", eth.getIp()[0], eth.getIp()[1], eth.getIp()[2], eth.getIp()[3]); HTTPText txt; HTTPResult r = http.get("http://mbed.org/media/uploads/donatien/hello.txt", &txt); if (r==HTTP_OK) { printf("Result ok : %s\n", txt.gets()); } else { printf("Error %d\n", r); } return 0; }