d

Dependencies:   mbed mbedWSEsbc

Files at this revision

API Documentation at this revision

Comitter:
caleblegis
Date:
Thu Oct 15 04:46:03 2015 +0000
Commit message:
A

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
mbedWSEsbc.lib 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	Thu Oct 15 04:46:03 2015 +0000
@@ -0,0 +1,45 @@
+#include "mbed.h"
+#include "mbedWSEsbc.h"
+
+
+//Max Lee, Caleb Legis
+//ES305
+//Temperature Sensor
+
+
+float measurement; // intialize measurement
+float Ttime;
+float Ts;
+float dt; // Initialize change in time
+float Time; // initialize time
+int repeat; // initialize repeat variable
+float Pi=3.14159;
+
+
+
+int main() {
+    //Initializes Mbed to access functionality of encoder, A/D, driver, etc. chipsets
+mbedWSEsbcInit(115200);
+//
+
+ //
+printf("Press 1 to begin"); //
+
+pc.scanf("%d,%f,%f",&repeat,&Ttime,&Ts);
+
+while (repeat==1) {
+    Time=0.0;
+    //once user enters 1, enters the while loop
+ //reset time variable
+t.reset(); //reset timer object
+while(Time<=Ttime) {
+   
+    measurement=LS7366_read_counter(2); //
+    pc.printf("%f,%f\n",Time,measurement); //
+    
+    Time=Time+Ts; //update time
+    dt= Ts - t.read(); //
+    wait(dt); //
+   t.reset(); }
+pc.scanf("%d,%f,%f",&repeat,&Ttime,&Ts); 
+}}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 15 04:46:03 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbedWSEsbc.lib	Thu Oct 15 04:46:03 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/jebradshaw/code/mbedWSEsbc/#9041603c430e