stuff

Dependencies:   BMP180 GliderFuncTest HMC5883L beep mbed-os

Files at this revision

API Documentation at this revision

Comitter:
chasefarmer2808
Date:
Wed Jun 07 03:45:01 2017 +0000
Commit message:
test;

Changed in this revision

BMP180.lib Show annotated file Show diff for this revision Revisions of this file
GliderFuncTest.lib Show annotated file Show diff for this revision Revisions of this file
HMC5883L.lib Show annotated file Show diff for this revision Revisions of this file
beep.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-os.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 79e72b6d48ab BMP180.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BMP180.lib	Wed Jun 07 03:45:01 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/chasefarmer2808/code/BMP180/#ae101ea7bd90
diff -r 000000000000 -r 79e72b6d48ab GliderFuncTest.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GliderFuncTest.lib	Wed Jun 07 03:45:01 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/chasefarmer2808/code/GliderFuncTest/#cf00868b46a7
diff -r 000000000000 -r 79e72b6d48ab HMC5883L.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HMC5883L.lib	Wed Jun 07 03:45:01 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/chasefarmer2808/code/HMC5883L/#65db23abde25
diff -r 000000000000 -r 79e72b6d48ab beep.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/beep.lib	Wed Jun 07 03:45:01 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/chasefarmer2808/code/beep/#302fee3845f7
diff -r 000000000000 -r 79e72b6d48ab main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jun 07 03:45:01 2017 +0000
@@ -0,0 +1,77 @@
+#include "GliderFuncTest.h"
+
+#define TX p9
+#define RX p10
+#define BUZZ_PIN p26
+#define SOLAR_PIN p16
+#define PITOT_PIN p15
+#define SDA p28
+#define SCL p27
+
+Serial pc(USBTX, USBRX);
+
+LocalFileSystem local("test");
+
+void log(char* s);
+void logln(char* s);
+
+GliderFuncTest test(SDA, SCL, TX, RX, SOLAR_PIN, PITOT_PIN, BUZZ_PIN);
+
+int main() {
+    while (!test.xbee->readable()) {
+        test.xbee->printf("Send any char to begin...\r\n");
+        wait(1);
+    }
+    
+    test.xbee->printf("Recieved %c.  Beginning Functionality Test...\r\n", test.xbee->getc());
+    
+    log("Testing digital compass...");
+    if (!test.testCompass()) {
+        logln("FAIL.");   
+    }
+    wait(2);
+    logln("PASS.");
+   
+    
+    log("Testing BMP180...");
+    if (!test.testBMP180()) {
+        logln("FAIL.");   
+    }
+    wait(2);
+    logln("PASS.");
+    
+    log("Testing solar panel voltage...");
+    if (!test.testSolarVoltage()) {
+        logln("FAIL.");   
+    }
+    wait(2);
+    logln("PASS.");
+    
+    log("Testing pitot tube...");
+    if (!test.testPitotVoltage()) {
+        logln("FAIL.");   
+    }
+    wait(2);
+    logln("PASS.");
+    
+    log("Testing buzzer...");
+    if (!test.testBuzzer()) {
+        logln("FAIL.");   
+    }
+    wait(2);
+    logln("PASS.");
+    
+    logln("Testing complete.");
+    
+    return 0;
+}
+
+void log(char* s) {
+    test.xbee->printf("%s", s);   
+    pc.printf("%s", s);
+}
+
+void logln(char* s) {
+    test.xbee->printf("%s\r\n", s);   
+    pc.printf("%s\r\n", s);
+}
\ No newline at end of file
diff -r 000000000000 -r 79e72b6d48ab mbed-os.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Wed Jun 07 03:45:01 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/bLandais/code/mbed-os/#4c0e0edd4545