For testing LED strobes

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
bclaus
Date:
Wed Dec 07 19:14:57 2016 +0000
Commit message:
Initial with one strobe;

Changed in this revision

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/main.cpp	Wed Dec 07 19:14:57 2016 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+
+AnalogIn vls(PTE22);
+AnalogIn current(A4);
+//DigitalOut led(LED_RED);
+Serial pc(USBTX, USBRX);
+DigitalOut myled(D0);
+
+int main()
+{
+    pc.baud(115200);
+    while (true) {
+        ////strobe on      
+        myled = 0;      
+        wait(0.05);
+        pc.printf("%f  %f \r\n", 100-vls.read()*100.0f,(current.read()*3.28-1.64)/.09);
+        
+        //strobe off
+        myled = 1;
+        wait(0.95);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Dec 07 19:14:57 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/d75b3fe1f5cb
\ No newline at end of file