Demo of combination HIDScope and encoder

Dependencies:   Encoder HIDScope mbed

Files at this revision

API Documentation at this revision

Comitter:
vsluiter
Date:
Wed Sep 09 13:44:08 2015 +0000
Child:
1:1db5c1c28a93
Commit message:
DemoBioRoboticsShield

Changed in this revision

Encoder.lib Show annotated file Show diff for this revision Revisions of this file
HIDScope.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Encoder.lib	Wed Sep 09 13:44:08 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/vsluiter/code/Encoder/#18b000b443af
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HIDScope.lib	Wed Sep 09 13:44:08 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/tomlankhorst/code/HIDScope/#5020a2c0934b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Sep 09 13:44:08 2015 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "HIDScope.h"
+#include "encoder.h"
+
+Encoder motor1(D13,D12);
+PwmOut led(D9);
+HIDScope scope(1);
+
+int main()
+{
+    
+    while (true) {
+        scope.set(0,motor1.getPosition());
+        led.write(motor1.getPosition()/100.0);
+        scope.send();
+        wait(0.2f);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Sep 09 13:44:08 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/ba1f97679dad
\ No newline at end of file