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: Hardwares/ArduCAM.cpp
- Revision:
- 40:be98219930e4
- Parent:
- 37:7074a6118d03
- Child:
- 41:7b21c5e3599e
--- a/Hardwares/ArduCAM.cpp Wed Mar 22 21:54:31 2017 +0000 +++ b/Hardwares/ArduCAM.cpp Wed Mar 22 23:43:24 2017 +0000 @@ -12,8 +12,6 @@ DigitalOut cam_cs(PIN_ACC_CS); -DigitalOut testLED2(LED_RED, 1); - inline void ardu_cam_spi_write_8(int address, int value) { @@ -110,7 +108,6 @@ ardu_cam_start_capture(); wait(0.1); - ardu_cam_set_mode(CAM2LCD_MODE); //unsigned char tempV = ardu_cam_read_reg(ARDUCHIP_MODE); @@ -124,26 +121,6 @@ return true; } -void ardu_cam_set_mode(uint8_t mode) -{ - //ardu_cam_bus_io(ARDUCHIP_MODE, mode); - switch(mode) - { - case MCU2LCD_MODE: - ardu_cam_spi_write_8(ARDUCHIP_MODE, MCU2LCD_MODE); - break; - case CAM2LCD_MODE: - ardu_cam_spi_write_8(ARDUCHIP_MODE, CAM2LCD_MODE); - break; - //case LCD2MCU_MODE: - //ardu_cam_spi_write_8(ARDUCHIP_MODE, LCD2MCU_MODE); - //break; - default: - ardu_cam_spi_write_8(ARDUCHIP_MODE, CAM2LCD_MODE); - break; - } -} - void ardu_cam_start_capture() { ardu_cam_spi_write_8(ARDUCHIP_FIFO, FIFO_CLEAR_MASK);