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
initDatabed/initDatabed.cpp
- Committer:
- perr1940
- Date:
- 2015-01-14
- Revision:
- 6:784990d5180a
- Parent:
- 3:ef7e0cbade6d
File content as of revision 6:784990d5180a:
#include "mbed.h" #include "MODSERIAL.h" #include "BluetoothComm.h" MODSERIAL xbeeUI(p28, p27); //XBee UI crutch communication Serial pc(USBTX, USBRX); SPISlave comm(p5, p6, p7, p8); // mosi, miso, sclk, ssel InterruptIn ssel(p8); //setting up a pin interrupt on the ssel pin as well // amplifier power on DigitalOut mainPower(p26); // power to board/motors etc //inhibit pins DigitalOut inhibit_L(p24); DigitalOut inhibit_R(p25); // various LEDs DigitalOut statusLed(p15); DigitalOut boardLed1(LED1); DigitalOut boardLed2(LED2); DigitalOut boardLed3(LED3); DigitalOut boardLed4(LED4); //Amplifier fault pins DigitalIn leftFault(p21); DigitalIn rightFault(p22); BluetoothComm phone(p9, p10); CAN BMS(p30, p29); CANMessage msg; void initializeDatabed() { xbeeUI.baud(115200); pc.baud(921600); comm.frequency(1000000); comm.format(8,1); inhibit_L=1; inhibit_R=1; BMS.frequency(250000); wait(1); pc.printf("Starting databed...\r\n"); }