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 haofan Zheng

Revision:
100:ffbeefc9e218
Parent:
99:c6665262fd3d
--- a/Hardwares/ArduCAM.h	Thu Apr 20 16:23:19 2017 +0000
+++ b/Hardwares/ArduCAM.h	Thu Apr 20 21:04:10 2017 +0000
@@ -14,7 +14,7 @@
 #define RESOLUTION_WIDTH  80   /*!< @brief The resolution width we are using. */
 #define RESOLUTION_HEIGHT 60   /*!< @brief The resolution height we are using. */
 //#define MANUAL_REDUCE_RESULOTION_BY2
-#define CAM_ROI_UPPER_LIMIT 6  /*!< @brief The number of lines we actually using for the image processing. */
+#define CAM_ROI_UPPER_LIMIT 7  /*!< @brief The number of lines we actually using for the image processing. */
 
 
 #define BOTH_NOT_FOUND   0     /*!< @brief ENUM for whether the border is found. Both sides of the border is not found. */
@@ -22,6 +22,12 @@
 #define RIGHT_FOUND      2     /*!< @brief ENUM for whether the border is found. Right side of the border is found. */
 #define BOTH_FOUND       3     /*!< @brief ENUM for whether the border is found. Both sides of the border is found. */
 
+#define INTERSECTION_NULL 0
+#define INTERSECTION_IN_L   1
+#define INTERSECTION_IN_R   2
+#define INTERSECTION_IN     3
+#define INTERSECTION_OUT  5
+
 //=====Must pick one and only one here!=====
 //#define ARDUCAM_SHIELD_OV2640     /*!< @brief Use ArduCam Shield V2 with OV2640 camera module. */
 //#define ARDUCAM_SHIELD_OV7725     /*!< @brief Use ArduCam Shield V2 with OV7725 camera module. */
@@ -114,9 +120,9 @@
 
 /**
 * @brief Get the array that describe the center line that detected by the image processing.
-* @return A volatile pointer points to the array.
+* @return A  pointer points to the array.
 */
-volatile const uint8_t* ardu_cam_get_center_array();
+ const uint8_t* ardu_cam_get_center_array();
 
 /**
 * @brief Check if the capture is finished.
@@ -152,7 +158,7 @@
 */
 uint8_t ardu_cam_get_ver_num();
 
-uint8_t ardu_cam_get_is_intersection_detected();
+uint8_t ardu_cam_get_intersection_info();
 
 #ifdef __cplusplus
 }