Final

Dependencies:   mbed

Fork of MiniProject5_LightTracker by Austin Sloop

Committer:
pstephens18
Date:
Mon Jan 11 23:27:38 2016 +0000
Revision:
11:7b3d64a66efd
Parent:
10:b7cebc1f3768
Child:
12:7bc0afbc651a
Display Working
;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
asloop18 0:68508074b5d5 1 //Main
asloop18 0:68508074b5d5 2
asloop18 0:68508074b5d5 3 #include "mbed.h"
pstephens18 1:8e14c2404f45 4 #include "SegDisplay.h"
asloop18 8:96b30706335b 5 #include "ServoControl.h"
asloop18 0:68508074b5d5 6
asloop18 10:b7cebc1f3768 7 AnalogIn sensor1(p19);
asloop18 10:b7cebc1f3768 8 AnalogIn sensor2(p20);
asloop18 10:b7cebc1f3768 9
asloop18 9:daeae936f9ec 10 float angle;
asloop18 9:daeae936f9ec 11
asloop18 2:d50d55831d50 12 int main(){
pstephens18 11:7b3d64a66efd 13 SegInit();
pstephens18 11:7b3d64a66efd 14 ServoInit();
asloop18 10:b7cebc1f3768 15
asloop18 10:b7cebc1f3768 16 if(sensor1>sensor2){angle=angle+1;}
asloop18 10:b7cebc1f3768 17 if(sensor1>sensor2){angle=angle+1;}
asloop18 10:b7cebc1f3768 18 ServoControl(angle);
pstephens18 11:7b3d64a66efd 19 SegDisplay(10,1);
pstephens18 11:7b3d64a66efd 20 }
asloop18 10:b7cebc1f3768 21