Biorobotics_group_2 / Mbed 2 deprecated Read_potentiometer

Dependencies:   HIDScope mbed

Files at this revision

API Documentation at this revision

Comitter:
sjoerdbarts
Date:
Thu Oct 06 13:28:03 2016 +0000
Parent:
1:3011d69df4a9
Commit message:
Initial code

Changed in this revision

HIDScope.lib Show annotated file Show diff for this revision Revisions of this file
MODSERIAL.lib 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
--- a/HIDScope.lib	Thu Oct 06 12:58:35 2016 +0000
+++ b/HIDScope.lib	Thu Oct 06 13:28:03 2016 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/tomlankhorst/code/HIDScope/#eade4ec5282b
+https://developer.mbed.org/users/sjoerdbarts/code/HIDScope/#a8f2a4683dd6
--- a/MODSERIAL.lib	Thu Oct 06 12:58:35 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://developer.mbed.org/users/Sissors/code/MODSERIAL/#4737f8a5b018
--- a/main.cpp	Thu Oct 06 12:58:35 2016 +0000
+++ b/main.cpp	Thu Oct 06 13:28:03 2016 +0000
@@ -1,22 +1,24 @@
 #include "mbed.h"
-// #include "HIDScope.h"
+#include "HIDScope.h"
  
 // Define the HIDScope and Ticker object
-// HIDScope    scope(1);
+HIDScope    scope(1);
 Ticker      scopeTimer;
  
 // Read the analog input
 AnalogIn    a0(A0);
+
+// Set LED out
 DigitalOut  led(LED_RED);
  
 const float kTimeLedToggle = .5f;  // period of blinking
-const int kLedOn=0;             // Led on if 0
+const int   kLedOn=0;             // Led on if 0
  
 // The data read and send function
 void scopeSend()
 {
-    // scope.set(0,a0.read());
-    // scope.send();
+    scope.set(0, a0.read());
+    scope.send();
 }
 
 void SwitchLed(){
@@ -27,14 +29,12 @@
 {
     led = not kLedOn;
     
-    // Create ticker
+    // Create ticker for LED and attach
     Ticker tick_toggle_led;
     tick_toggle_led.attach(SwitchLed,kTimeLedToggle);
+    
     // Attach the data read and send function at 100 Hz
-    // scopeTimer.attach(scopeSend, 1e4);
+    scopeTimer.attach(scopeSend, 1e4);
    
-    
-    
-    
     while(true);
 }
\ No newline at end of file
--- a/mbed.bld	Thu Oct 06 12:58:35 2016 +0000
+++ b/mbed.bld	Thu Oct 06 13:28:03 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/abea610beb85
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/aae6fcc7d9bb
\ No newline at end of file