JIAWEI ZHANG / Mbed 2 deprecated ele350ku

Dependencies:   mbed

Dependents:   Exercise8_1-2-3

Fork of ele350 by JIAWEI ZHANG

Revision:
37:83b729ea17d4
Parent:
36:a9f4a3409c89
Child:
39:ab2557044815
--- a/sine_app.cpp	Thu Dec 17 13:40:16 2015 +0000
+++ b/sine_app.cpp	Thu Dec 17 13:52:37 2015 +0000
@@ -15,7 +15,7 @@
 
 void SineApp::run()
 {
-   this->analogOut->write(2.0/3.0*0.5*(1+sin(20.0*3.14159*2*timer.read())));
+   this->analogOut->write(this->amplitude/3.0*0.5*(1+sin(20.0*3.14159*2*timer.read())));
    
 
 }
@@ -30,4 +30,4 @@
 void SineApp::setamplitude(float newamplitude)
 {
     this->amplitude = newamplitude;
-}
+}
\ No newline at end of file