Setup

Committer:
jmateo09
Date:
Thu Feb 28 15:54:52 2019 +0000
Revision:
0:17b249a76ce6
Setup;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jmateo09 0:17b249a76ce6 1 #include "mbed.h"
jmateo09 0:17b249a76ce6 2 #include "XBee.h"
jmateo09 0:17b249a76ce6 3 #include "MODSERIAL.h"
jmateo09 0:17b249a76ce6 4 #include "sstream"
jmateo09 0:17b249a76ce6 5
jmateo09 0:17b249a76ce6 6 class Communication
jmateo09 0:17b249a76ce6 7 {
jmateo09 0:17b249a76ce6 8 public:
jmateo09 0:17b249a76ce6 9 Communication();
jmateo09 0:17b249a76ce6 10 MODSERIAL pc;
jmateo09 0:17b249a76ce6 11 MODSERIAL XBee;
jmateo09 0:17b249a76ce6 12 void DoComConfig(char *swversion);
jmateo09 0:17b249a76ce6 13
jmateo09 0:17b249a76ce6 14 private:
jmateo09 0:17b249a76ce6 15
jmateo09 0:17b249a76ce6 16 };
jmateo09 0:17b249a76ce6 17
jmateo09 0:17b249a76ce6 18 class IO
jmateo09 0:17b249a76ce6 19 {
jmateo09 0:17b249a76ce6 20 public:
jmateo09 0:17b249a76ce6 21 IO();
jmateo09 0:17b249a76ce6 22 // Mapping IO-pins
jmateo09 0:17b249a76ce6 23 // Onboard Leds on the Mbed.
jmateo09 0:17b249a76ce6 24 DigitalOut myled1;
jmateo09 0:17b249a76ce6 25 DigitalOut myled2;
jmateo09 0:17b249a76ce6 26 DigitalOut myled3;
jmateo09 0:17b249a76ce6 27 DigitalOut myled4;
jmateo09 0:17b249a76ce6 28
jmateo09 0:17b249a76ce6 29 // RGB LED background.
jmateo09 0:17b249a76ce6 30 PwmOut LCDRed;
jmateo09 0:17b249a76ce6 31 PwmOut LCDGreen;
jmateo09 0:17b249a76ce6 32 PwmOut LCDBlue;
jmateo09 0:17b249a76ce6 33
jmateo09 0:17b249a76ce6 34
jmateo09 0:17b249a76ce6 35
jmateo09 0:17b249a76ce6 36 //PushButtons & Selector switch, they all need the 'Pull-up' function.
jmateo09 0:17b249a76ce6 37 //FB means 'Function Button'.
jmateo09 0:17b249a76ce6 38 DigitalIn FB1; // Black pushbutton, Wire color: Orange & black.
jmateo09 0:17b249a76ce6 39 DigitalIn FB2; // Black pushbutton, Wire color: Orange & black.
jmateo09 0:17b249a76ce6 40 DigitalIn FB3; // Green pushbutton, Wire color: Orange & black.
jmateo09 0:17b249a76ce6 41
jmateo09 0:17b249a76ce6 42 //Motor Pins
jmateo09 0:17b249a76ce6 43 PwmOut Speed;
jmateo09 0:17b249a76ce6 44 DigitalOut CW;
jmateo09 0:17b249a76ce6 45 DigitalOut CCW;
jmateo09 0:17b249a76ce6 46
jmateo09 0:17b249a76ce6 47 //SW means 'Selector Switch'.
jmateo09 0:17b249a76ce6 48 //(Pins to be determent(P18,P19).)
jmateo09 0:17b249a76ce6 49 DigitalIn SW1;
jmateo09 0:17b249a76ce6 50 DigitalIn SW2;
jmateo09 0:17b249a76ce6 51
jmateo09 0:17b249a76ce6 52 void DoIOConfig();
jmateo09 0:17b249a76ce6 53 private:
jmateo09 0:17b249a76ce6 54
jmateo09 0:17b249a76ce6 55 };