
OBD Source Code -Section 1- Without Car / Section 2 - With car
Dependencies: mbed
Diff: main.cpp
- Revision:
- 2:49712259aa71
- Parent:
- 1:c23c05b36e33
--- a/main.cpp Sun Mar 19 22:57:49 2017 +0000 +++ b/main.cpp Mon Apr 03 06:02:26 2017 +0000 @@ -24,7 +24,7 @@ //-------------------------------------------------------------------------------------------------------- -//I2C i2cm(PB_9, PB_8); +I2C i2cm(PB_9, PB_8); Serial pcm(USBTX, USBRX); Serial OBD_UARTm(PA_0, PA_1); @@ -200,24 +200,38 @@ //activity_inactivity.rise(interrupt_activity_inactivity); // Attach the address of interrupt_activity_inactivity function to rising edge //double_tap.rise(interrupt_sudden_jerk); - pcm.baud(38400); - OBD_UARTm.baud(38400); + pcm.baud(9600); + OBD_UARTm.baud(9600); pcm.printf("\r\n\r\n\t\t>>>>>------>> OBD - ACCELEROMETER INTERFACE <<------<<<<<\r\n\r\n"); - /* + initialize_obd(); // OBD- scan tool initialization would be done here fetch_battery_voltage(); // OBD - section + fetch_vin_number(); + fetch_vehicle_speed(); + fetch_engine_rpm(); + + //rpm_padding_for_comm_test(); + + check_for_MIL(); - if(no_of_stored_dtc > 0) - check_for_dtc(); - */ - fetch_vin_number(); + check_for_dtc(); + + + + + + //if(no_of_stored_dtc > 0) + //check_for_dtc(); + //check_for_dtc(); + + //initialize_accelerometer(); // All Accerometer configurations will be done here //while(1); // Wait forever, let the ISR do the rest