Fork using ethernetinterface
Dependencies: EthernetInterface HTTPClient ID12RFID mbed-rtos mbed
Fork of TweetRFID by
Revision 5:5154c1a6442b, committed 2013-01-18
- Comitter:
- stevep
- Date:
- Fri Jan 18 17:17:01 2013 +0000
- Parent:
- 4:45a7d7fc1161
- Commit message:
- Update TweetRFID to use ethernetinterface.
Changed in this revision
diff -r 45a7d7fc1161 -r 5154c1a6442b EthernetInterface.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EthernetInterface.lib Fri Jan 18 17:17:01 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/EthernetInterface/#a0ee3ae75cfa
diff -r 45a7d7fc1161 -r 5154c1a6442b EthernetNetIf.lib --- a/EthernetNetIf.lib Thu Aug 05 15:17:52 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/donatien/code/EthernetNetIf/#bc7df6da7589
diff -r 45a7d7fc1161 -r 5154c1a6442b HTTPClient.lib --- a/HTTPClient.lib Thu Aug 05 15:17:52 2010 +0000 +++ b/HTTPClient.lib Fri Jan 18 17:17:01 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/donatien/code/HTTPClient/#d97a4fc01c86 +http://mbed.org/users/stevep/code/HTTPClient/#8299c6440e37
diff -r 45a7d7fc1161 -r 5154c1a6442b main.cpp --- a/main.cpp Thu Aug 05 15:17:52 2010 +0000 +++ b/main.cpp Fri Jan 18 17:17:01 2013 +0000 @@ -9,7 +9,7 @@ #include "mbed.h" #include "ID12RFID.h" -#include "EthernetNetIf.h" +#include "EthernetInterface.h" #include "HTTPClient.h" #define TWITTER_USER "myusername" @@ -19,7 +19,7 @@ const int ids_list[IDS_COUNT] = {89481809, 89481810, 89481811}; const char* names_list[IDS_COUNT] = {"Donatien", "Simon", "Dan"}; -EthernetNetIf ethernet; +EthernetInterface ethernet; HTTPClient twitter; ID12RFID rfid(p14); @@ -27,7 +27,8 @@ DigitalOut tweet_ok(LED4); int main() { - ethernet.setup(); + ethernet.init(); + ethernet.connect(); twitter.basicAuth(TWITTER_USER, TWITTER_PASSWORD); while(true) { @@ -36,8 +37,8 @@ for(int i = 0; i < IDS_COUNT; i++) { if (ids_list[i] == id) { HTTPMap msg; - msg["status"] = names_list[i]; - msg["status"] += " just arrived home!"; + msg.put("status", names_list[i]); + //msg["status"] += " just arrived home!"; HTTPResult r = twitter.post("http://api.supertweet.net/1/statuses/update.xml", msg, NULL); tweet_ok = !r; }
diff -r 45a7d7fc1161 -r 5154c1a6442b mbed-rtos.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Fri Jan 18 17:17:01 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#88a1a9c26ae3
diff -r 45a7d7fc1161 -r 5154c1a6442b mbed.bld --- a/mbed.bld Thu Aug 05 15:17:52 2010 +0000 +++ b/mbed.bld Fri Jan 18 17:17:01 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da +http://mbed.org/users/mbed_official/code/mbed/builds/0480438fc29c \ No newline at end of file