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:
36:7e747e19f660
Parent:
27:c68f711e5b67
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RemovedSources/Camera.h.txt	Tue Mar 14 22:23:15 2017 +0000
@@ -0,0 +1,49 @@
+#pragma once
+#include "mbed.h"
+#include <vector>
+
+#include "OV7725RegBuf.h"
+
+#define CAMERA_PIXEL_WIDTH  160
+#define CAMERA_PIXEL_HEIGHT 120
+#define PICTURE_ARRAY_SIZE ((CAMERA_PIXEL_WIDTH / 8) * CAMERA_PIXEL_HEIGHT)
+
+namespace SW
+{
+    class Core;
+}
+
+class Camera
+{
+public:
+
+    Camera(SW::Core & core);
+
+    ~Camera();
+    
+    void Update(float deltaTime);
+    
+    bool HasPicture() const;
+    
+    const unsigned char * GetPicture() const;
+    
+    void StartReceivingPic();
+    
+    void StopReceivingPic();
+    
+private:
+    
+    Camera();
+    
+    SW::Core & m_core;
+    
+    InterruptIn m_pClock;
+    
+    InterruptIn m_href;
+    
+    InterruptIn m_vsnyc;
+    
+    OV7725RegBuf * m_regBuf;
+    
+    float m_debugOutputTimer;
+};