![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
stuff
Dependencies: BMP180 GliderFuncTest HMC5883L beep mbed-os
Revision 0:79e72b6d48ab, committed 2017-06-07
- Comitter:
- chasefarmer2808
- Date:
- Wed Jun 07 03:45:01 2017 +0000
- Commit message:
- test;
Changed in this revision
--- /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
--- /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
--- /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
--- /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
--- /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
--- /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