Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ExoController MODSERIAL SDFileSystem_HelloWorld UI-Honka mbed
Fork of Data Management by
Diff: initDatabed/initDatabed.cpp
- Revision:
- 8:f8fd59fe3e11
- Parent:
- 3:ef7e0cbade6d
- Child:
- 9:26e200175e0e
--- a/initDatabed/initDatabed.cpp Fri Dec 12 23:14:40 2014 +0000 +++ b/initDatabed/initDatabed.cpp Sat Feb 14 00:38:04 2015 +0000 @@ -1,6 +1,7 @@ #include "mbed.h" #include "MODSERIAL.h" #include "BluetoothComm.h" +#include "SDFile.h" MODSERIAL xbeeUI(p28, p27); //XBee UI crutch communication @@ -24,15 +25,23 @@ //Amplifier fault pins DigitalIn leftFault(p21); DigitalIn rightFault(p22); - -BluetoothComm phone(p9, p10); +SDFileSystem sd(p11, p12, p13, p14, "sd"); +//SDFileSystem sd(p5, p6, p7, p19, "sd"); +SDFile err("/sd/", "error.txt", true); +SDFile readData("/sd/", "data.txt", false); +SDFile param("/sd/", "param.txt", false); +SDFile testFile("/sd/", "test.txt", false); CAN BMS(p30, p29); CANMessage msg; - +Ticker interrupt; +/* NOTE--BluetoothComm pins may be wrong */ +BluetoothComm phone(p9, p10); +//BluetoothComm phone(p13, p14); void initializeDatabed() { xbeeUI.baud(115200); - pc.baud(921600); - + // printf("setting pc baud ...\r\n"); + //pc.baud(921600); + printf("setting comm freq\r\n"); comm.frequency(1000000); comm.format(8,1); inhibit_L=1; @@ -40,6 +49,6 @@ BMS.frequency(250000); wait(1); - pc.printf("Starting databed...\r\n"); + printf("Starting databed...\r\n"); }