setup

Dependencies:   mbed

Committer:
cheryl_he
Date:
Wed Jun 03 01:46:22 2015 +0000
Revision:
0:8702cf8a21de
setup

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cheryl_he 0:8702cf8a21de 1 #include "mbed.h"
cheryl_he 0:8702cf8a21de 2 #include "stdlib.h"
cheryl_he 0:8702cf8a21de 3 #include <vector>
cheryl_he 0:8702cf8a21de 4
cheryl_he 0:8702cf8a21de 5 //Outputs
cheryl_he 0:8702cf8a21de 6 DigitalOut led1(LED1);
cheryl_he 0:8702cf8a21de 7 DigitalOut clk(PTD5);
cheryl_he 0:8702cf8a21de 8 DigitalOut si(PTD4);
cheryl_he 0:8702cf8a21de 9 PwmOut motor1(PTA12);
cheryl_he 0:8702cf8a21de 10 PwmOut motor2(PTA4);
cheryl_he 0:8702cf8a21de 11 DigitalOut break1(PTC7);
cheryl_he 0:8702cf8a21de 12 DigitalOut break2(PTC0);
cheryl_he 0:8702cf8a21de 13 PwmOut servo(PTA5);
cheryl_he 0:8702cf8a21de 14
cheryl_he 0:8702cf8a21de 15 //bluetooth
cheryl_he 0:8702cf8a21de 16 Serial bt(PTA2, PTA1);
cheryl_he 0:8702cf8a21de 17
cheryl_he 0:8702cf8a21de 18 //Inputs
cheryl_he 0:8702cf8a21de 19 AnalogIn camData(PTC2);
cheryl_he 0:8702cf8a21de 20
cheryl_he 0:8702cf8a21de 21 //Encoder setup and variables
cheryl_he 0:8702cf8a21de 22 InterruptIn interrupt(PTA13);
cheryl_he 0:8702cf8a21de 23
cheryl_he 0:8702cf8a21de 24 int main() {
cheryl_he 0:8702cf8a21de 25 while(1) {
cheryl_he 0:8702cf8a21de 26 myled = 1;
cheryl_he 0:8702cf8a21de 27 wait(0.2);
cheryl_he 0:8702cf8a21de 28 myled = 0;
cheryl_he 0:8702cf8a21de 29 wait(0.2);
cheryl_he 0:8702cf8a21de 30 }
cheryl_he 0:8702cf8a21de 31 }