All the commit done for assignment 3
Dependencies: MCP23017 Servo WattBob_TextLCD mbed mbed-rtos
Diff: main.cpp
- Revision:
- 4:9f5ebb8d85ba
- Parent:
- 3:e8046c9a605c
- Child:
- 5:72f209412e34
diff -r e8046c9a605c -r 9f5ebb8d85ba main.cpp --- a/main.cpp Tue Apr 04 17:45:46 2017 +0000 +++ b/main.cpp Tue Apr 04 18:19:10 2017 +0000 @@ -24,13 +24,13 @@ MCP23017 *par_port; // pointer to 16-bit parallel I/O object WattBob_TextLCD *lcd; // pointer to 2*16 chacater LCD object Serial serpc(USBTX, USBRX); // serial usb connection tx, rx -AnalogIn AinBreak(p15); // Port for the Break Value -AnalogIn AinAccel(p18); // Port for the Accelerator Value +AnalogIn AinBreak(p18); // Port for the Break Value +AnalogIn AinAccel(p19); // Port for the Accelerator Value DigitalIn DinSwitchEngine(p11); // Port for the Engine Switch DigitalIn DinSwitchLight(p12); // Port for the Light Switch DigitalIn DinSwitchRindic(p13); // Port for the Right Indicator -DigitalIn DinSwitchLindic(p14); // Port for the Left Indicator -Servo Odometer(p26); +DigitalIn DinSwitchLindic(p15); // Port for the Left Indicator +Servo Odometer(p25); DigitalOut LEDSpeedWarning(p8); DigitalOut DoutLEDLight(LED1); // Output Port for LED1 DigitalOut DoutLEDLeft(LED2); // Output Port for LED2 @@ -247,7 +247,7 @@ { // Let the Semaphores wait SemAvgSpeed.wait(); -if(avgSpeed>75.0) // check our speed +if(avgSpeed>70.0) // check our speed LEDSpeedWarning = !LEDSpeedWarning; // and switch the Warning on/off else LEDSpeedWarning = 0;