Example of using the Arduino header on the GR-PEACH

Dependencies:   mbed

Revision:
0:83f8f2250665
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jun 29 17:06:30 2017 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+/*
+This demo uses the Arduino Relay Sheild from Seeed.
+Here is the link to the shield
+http://wiki.seeed.cc/Relay_Shield_v3/
+The Arduino pin mapping is as follows
+Ardino      Relay
+D7          relay 1
+D6          relay 2
+D5          relay 3
+D4          relay 4
+*/
+DigitalOut relay1(D7);
+DigitalOut relay2(D6);
+DigitalOut relay3(D5);
+DigitalOut relay4(D4);
+
+/*
+    Toggle the relay with a period of 
+*/
+int main() {
+    while(1) {
+        relay1 = 1;
+        wait(0.5); // wait 0.5 sec ( 500ms)
+        relay1 = 0;
+        wait(0.5); // wait 0.5 sec ( 500ms)
+    }
+}