JIAWEI ZHANG / Mbed 2 deprecated ele350ku

Dependencies:   mbed

Dependents:   Exercise8_1-2-3

Fork of ele350 by JIAWEI ZHANG

Revision:
44:913bd7824dae
Parent:
34:498a218cf53e
Child:
45:e03bac876518
--- a/constant_app.cpp	Thu Dec 17 16:22:03 2015 +0000
+++ b/constant_app.cpp	Thu Dec 17 16:37:43 2015 +0000
@@ -9,7 +9,12 @@
 {
     App::start();
     this->analogOut->write(this->amplitude/3.0f);
-    this->timer.start(); 
+    this->timer.start();
+    float amplitude;
+    amplitude = 2.95;
+    if ( amplitude > 2.95f ) {
+       this->analogOut->write(0);
+    } else { this->analogOut->write(this->amplitude/2.95f);} 
 
 }