see: https://developer.mbed.org/users/phsfan/notebook/phsshield/

Dependencies:   Stewitter_a3gs a3gs mbed

Files at this revision

API Documentation at this revision

Comitter:
phsfan
Date:
Wed Apr 01 06:22:19 2015 +0000
Commit message:
1st build;

Changed in this revision

Stewitter_a3gs.lib Show annotated file Show diff for this revision Revisions of this file
a3gs.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Stewitter_a3gs.lib	Wed Apr 01 06:22:19 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/phsfan/code/Stewitter_a3gs/#4fc466e9fb48
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/a3gs.lib	Wed Apr 01 06:22:19 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/phsfan/code/a3gs/#ca471c239d5f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Apr 01 06:22:19 2015 +0000
@@ -0,0 +1,38 @@
+#include "mbed.h"
+#include "a3gs.h"
+#include "Stewitter_a3gs.h"
+
+Serial pc(USBTX, USBRX);
+DigitalOut myled(LED1);
+
+A3GS a3gs(p28, p27, p29, p23, p11, 9600); // tx, rx, interrupt, power, regulator
+Stewitter_a3gs twitter("YOUR TOKEN", a3gs);
+
+const char *msg = "Hello, World! I'm mbed!"; // url encoded ASCII or UTF-8
+
+int main() {
+    pc.baud(115200);
+    pc.printf("*** PHS Shield\r\n");
+
+    a3gs.start();
+    if (a3gs.begin()) {
+        error("Could not connect");
+    }
+    myled = 1;
+
+    if (twitter.lastMention()) {
+        int status = twitter.wait();
+        printf("lastMention: %d '%s'\r\n", status, twitter.response());
+    }
+
+    if (twitter.post(msg)) {
+        int status = twitter.wait();
+        printf("post: %d '%s'\r\n", status, twitter.response());
+    }
+
+    wait(1);
+    pc.printf("bye\r\n");
+    a3gs.end();
+    a3gs.shutdown();
+    myled = 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Apr 01 06:22:19 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0
\ No newline at end of file