Buggy bois / Mbed 2 deprecated WORKING_TRIAL

Dependencies:   mbed

Revision:
9:cefa177c1353
Parent:
8:5ed6685f6edd
--- a/SensorControl/lineSensor.h	Sun Mar 31 20:31:30 2019 +0000
+++ b/SensorControl/lineSensor.h	Fri Apr 05 16:11:28 2019 +0000
@@ -9,7 +9,7 @@
     Timeout sampler;
     
     public:
-    float static const sampleTime = 0.00009f;
+    float static const sampleTime = 0.00004f;
     
     lineSensor(PinName E, PinName R):emitter(E), receiver(R)
     {   
@@ -43,6 +43,7 @@
     void sample(void)
     {
         turnOn();
+        lineVoltage = receiver.read()*vREF;
         sampler.attach(callback(this, &lineSensor::turnOff),sampleTime);
     }