Nucleo based high altitude balloon computer

Dependencies:   SDFileSystem Venus838 mbed MS5611 TinyGPS

Files at this revision

API Documentation at this revision

Comitter:
ethanharstad
Date:
Tue Jun 24 05:42:15 2014 +0000
Parent:
0:5c7eeb7672d2
Child:
2:244d3912b449
Commit message:
Update structure

Changed in this revision

Atlas.cpp Show annotated file Show diff for this revision Revisions of this file
Atlas.h Show annotated file Show diff for this revision Revisions of this file
SDFileSystem.lib Show annotated file Show diff for this revision Revisions of this file
Venus838.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show diff for this revision Revisions of this file
mbed-rtos-nucleo.lib 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/Atlas.cpp	Tue Jun 24 05:42:15 2014 +0000
@@ -0,0 +1,45 @@
+#include "mbed.h"
+#include "Atlas.h"
+#include "SDFileSystem.h"
+#include "Venus838.h"
+
+DigitalOut grn(LED_GRN);
+DigitalOut ylw(LED_YLW);
+Serial pc(USBTX, USBRX);
+Venus838 gps(GPS_TX, GPS_RX);
+SDFileSystem sd(SPI_MOSI, SPI_MISO, SPI_SCK, SPI_CS, "sd");
+
+void init() {
+    pc.baud(115200);
+    grn = LED_ON;
+    ylw = LED_ON;
+    
+    gps.setUpdateRate(10);
+    gps.setNavigationMode(4);
+    gps.setNmeaMessages(true, false, false, false, true, false);
+    
+    printf("Attempting to open SD card...\n");
+    mkdir("/sd/mydir", 0777);
+    
+    printf("Attempting to open file...\n");
+    FILE *fp = fopen("/sd/mydir/sdtest.txt", "w");
+    if(fp == NULL) {
+        error("Could not open file for write\n");
+        ylw = LED_OFF;
+    }
+    fprintf(fp, "Hello fun SD Card World!");
+    
+    printf("Closing file...\n");
+    fclose(fp);
+    
+    pc.printf("Atlas Ready!\n");
+}
+
+int main() {
+    init();
+    while(true) {
+        if(gps.readable()) {
+            pc.putc(gps.getc());
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Atlas.h	Tue Jun 24 05:42:15 2014 +0000
@@ -0,0 +1,15 @@
+#define LED_GRN PC_8
+#define LED_YLW PC_6
+#define LED_ON 0
+#define LED_OFF 1
+
+#define GPS_TX PA_11
+#define GPS_RX PA_12
+
+#define RFD_TX PA_2
+#define RFD_RX PA_3
+
+#define XBEE_TX PA_9
+#define XBEE_RX PA_10
+
+#define IMU_INT PC_5
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SDFileSystem.lib	Tue Jun 24 05:42:15 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/mbed/code/SDFileSystem/#7b35d1709458
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Venus838.lib	Tue Jun 24 05:42:15 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/Aerodyne/code/Venus838/#8c7efefad15e
--- a/main.cpp	Mon Jun 02 05:56:58 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#include "mbed.h"
-#include "rtos.h"
-
-int main() {
-    while(true) {
-    }
-}
\ No newline at end of file
--- a/mbed-rtos-nucleo.lib	Mon Jun 02 05:56:58 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/ethanharstad/code/mbed-rtos-nucleo/#bc70d1854e6f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jun 24 05:42:15 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721
\ No newline at end of file