The subsystem design/basis for the final project

Dependencies:   mbed-rtos mbed-src pixylib

Committer:
balsamfir
Date:
Sun Mar 13 17:55:42 2016 +0000
Revision:
2:2bc519e14bae
Child:
3:dfb6733ae397
First compile of big ass change

Who changed what in which revision?

UserRevisionLine numberNew contents of line
balsamfir 2:2bc519e14bae 1 #include "mbed.h"
balsamfir 2:2bc519e14bae 2 #include "rtos.h"
balsamfir 2:2bc519e14bae 3
balsamfir 2:2bc519e14bae 4 // ----------------------------------------------------------------
balsamfir 2:2bc519e14bae 5 // Contains common defintions share between modes
balsamfir 2:2bc519e14bae 6 // ----------------------------------------------------------------
balsamfir 2:2bc519e14bae 7
balsamfir 2:2bc519e14bae 8 // IO Port
balsamfir 2:2bc519e14bae 9 extern DigitalOut led1;
balsamfir 2:2bc519e14bae 10 extern DigitalOut led2;
balsamfir 2:2bc519e14bae 11 extern DigitalOut led3;
balsamfir 2:2bc519e14bae 12 extern DigitalOut led4;
balsamfir 2:2bc519e14bae 13 extern DigitalOut leftDir;
balsamfir 2:2bc519e14bae 14 extern DigitalOut rightDir;
balsamfir 2:2bc519e14bae 15 extern DigitalOut spiReset;
balsamfir 2:2bc519e14bae 16 extern DigitalOut ioReset;
balsamfir 2:2bc519e14bae 17
balsamfir 2:2bc519e14bae 18 // Comunication
balsamfir 2:2bc519e14bae 19 extern PwmOut leftPwm;
balsamfir 2:2bc519e14bae 20 extern PwmOut rightPwm;
balsamfir 2:2bc519e14bae 21 extern SPI deSpi;
balsamfir 2:2bc519e14bae 22 extern Serial pc; // PC serial channel
balsamfir 2:2bc519e14bae 23 extern Serial bt; // Bluetooth serial channel
balsamfir 2:2bc519e14bae 24
balsamfir 2:2bc519e14bae 25 // Method prototypes
balsamfir 2:2bc519e14bae 26 void PI(float *xState, float *u, float setPoint, float kP, float kI, float feedback, float bound);
balsamfir 2:2bc519e14bae 27 float QE2RadsPerSec(int counts, int time);