SmartWheels self-driving race car. Designed for NXP Cup. Uses FRDM-KL25Z, area-scan camera, and simple image processing to detect and navigate any NXP spec track.
Dependencies: TSI USBDevice mbed-dev
Fork of SmartWheels by
Diff: main.cpp
- Revision:
- 62:bc5caf59fe39
- Parent:
- 57:0d8a155d511d
- Child:
- 63:d9a81b3d69f5
--- a/main.cpp Sat Apr 08 17:40:13 2017 +0000 +++ b/main.cpp Sun Apr 09 18:20:57 2017 +0000 @@ -3,7 +3,7 @@ #include <math.h> #define PI 3.14159265f -//#define SW_DEBUG +#define SW_DEBUG #include "SWCommon.h" #include "GlobalVariable.h" @@ -15,6 +15,7 @@ #include "ArduCAM.h" #include "ArduUTFT.h" +#include "IMUManager.h" #include "PinAssignment.h" @@ -50,6 +51,11 @@ ardu_cam_init(); + + uint8_t IMUInitResult = imu_manager_init(); + LOGI("IMU Init: %#x", IMUInitResult); + //wait(0.5); + //timer.reset(); timer.start(); float timeWas = timer.read(); @@ -137,6 +143,14 @@ } //LOGI("FPS: %f", 1 / deltaTime); + + //imu_manager_init(); + imu_manager_update(); + + const volatile struct imu_vec3* AccelV = imu_manager_get_accl(); + + LOGI("A: %5.3f, %5.3f, %5.3f ", AccelV->x, AccelV->y, AccelV->z); + counter.Update(); /*