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:
92:e9bd429f16b5
Parent:
87:15fcf7891bf9
Child:
96:ec89c4d1383d
--- a/Hardwares/ArduUTFT.cpp	Wed Apr 19 14:54:14 2017 +0000
+++ b/Hardwares/ArduUTFT.cpp	Wed Apr 19 17:15:46 2017 +0000
@@ -84,8 +84,8 @@
 void ardu_utft_init()
 {
     //char buf[20];
-    uint8_t VerNum = ardu_cam_spi_read_8(0x40);
-    VerNum = ardu_cam_spi_read_8(0x40);
+    uint8_t VerNum = ardu_cam_spi_read_8(ARDUCHIP_VER_UTFT);
+    VerNum = ardu_cam_spi_read_8(ARDUCHIP_VER_UTFT);
     
     
     //sprintf(buf, "UTFT Ver %#x", VerNum);
@@ -158,10 +158,7 @@
 
 void ardu_cam_set_mode(uint8_t mode)
 {
-    /////////////////////////////////
-    //Careful here!!
-    ardu_cam_spi_write_8(0x02, 0x00);
-    
+    ardu_cam_spi_write_8(ARDUCHIP_MODE, MCU2LCD_MODE);
 }
 
 void ardu_utft_clr_scr()