Biorobotics / Mbed 2 deprecated Hidscope_encoder

Dependencies:   HIDScope mbed

Revision:
0:27d918875644
diff -r 000000000000 -r 27d918875644 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Sep 23 09:20:39 2015 +0000
@@ -0,0 +1,50 @@
+#include "mbed.h"
+#include "HIDScope.h"
+
+
+// Define pin for motor control
+DigitalOut dirPin(D4);
+DigitalOut PWM(D5);
+
+// Define the HIDScope and Ticker object
+HIDScope    scope(1);   // 
+Ticker      scopeTimer;
+
+// Read the analog input
+AnalogIn    a0(PTC10);
+
+
+
+ 
+// The data read and send function
+void scopeSend()
+{
+    scope.set(0,a0.read());
+    scope.send();
+}
+
+
+int main()
+{
+    // Attach the data read and send function at 100 Hz
+    scopeTimer.attach_us(&scopeSend, 1e4);   
+    
+    while(1) { // let the motor run
+        dirPin.write(0);
+        PWM.write(1);
+        
+         }
+
+        
+        
+        
+
+}
+
+
+ 
+
+ 
+
+ 
+