VNG bot battle

Dependencies:   BLE_API mbed nRF51822

Revision:
0:122d7bf3bbf0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SensorController.h	Mon Sep 05 19:55:23 2016 +0000
@@ -0,0 +1,45 @@
+/*
+ * SensorController.h
+ *
+ *  Created on: Aug 26, 2016
+ *      Author: tanpt
+ */
+
+#ifndef SENSORCONTROLLER_H_
+#define SENSORCONTROLLER_H_
+
+#include "common.h"
+
+//// Sensor
+#define SENSOR_NOISE 5
+
+class SensorController {
+public:
+    SensorController();
+    ~SensorController();
+
+    enum SensorState {
+        SENSOR_ON = 0, SENSOR_OFF = 1
+    };
+
+    void init();
+
+    uint16_t distanceSensorFront();
+    uint16_t distanceSensorRight();
+    uint16_t distanceSensorLeft();
+    uint8_t frontRightSensor();
+    uint8_t frontLeftSensor();
+    uint8_t backSensor();
+
+private:
+
+    static AnalogIn sensorDistanceFront_;
+    static AnalogIn sensorDistanceRight_;
+    static AnalogIn sensorDistanceLeft_;
+    static DigitalIn sensorFrontRight_;
+    static DigitalIn sensorFrontLeft_;
+    static DigitalIn sensorBack_;
+    static DigitalIn sensorIR_;
+};
+
+#endif /* SENSORCONTROLLER_H_ */