![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
xx
Fork of PES1 by
Diff: main.cpp
- Revision:
- 1:4e84271a70c6
- Parent:
- 0:306a2438de17
- Child:
- 2:953263712480
diff -r 306a2438de17 -r 4e84271a70c6 main.cpp --- a/main.cpp Tue Mar 21 12:42:01 2017 +0000 +++ b/main.cpp Tue Apr 04 11:55:54 2017 +0000 @@ -4,27 +4,35 @@ DigitalOut led(LED1); //Periphery for distance sensors -AnalogIn distance(PB_1); +AnalogIn distance(PB_1); DigitalOut enable(PC_1); DigitalOut bit0(PH_1); DigitalOut bit1(PC_2); DigitalOut bit2(PC_3); IRSensor sensors[6]; +PwmOut pwmL( PA_8 ); +PwmOut pwmR( PA_9 ); + //motor stuff DigitalOut enableMotorDriver(PB_2); -PwmOut pwmL(PA_8); -PwmOut pwmR(PA_9); //indicator leds arround robot DigitalOut leds[] = { PC_8, PC_6, PB_12, PA_7, PC_0, PC_9 }; +Roboter roboter1(&distance, &bit0, &bit1, &bit2, &pwmL, &pwmR); -int main(){ - - - - - -return 0; -} \ No newline at end of file +int main() +{ + enable = 1; + enableMotorDriver = 1; + + while(1) { + + roboter1.bandeAusweichen(); + // roboter.readSensor1(); + + wait(0.1f); + + } +}