Amplitude Modulation Code

Dependencies:   HIDScope mbed

Fork of SymbitronValves by First Last

Files at this revision

API Documentation at this revision

Comitter:
franciscoguerra
Date:
Thu Jan 14 16:07:39 2016 +0000
Parent:
7:9f6dfd88cd18
Commit message:
Amplitude Modulation Code

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jul 03 12:59:11 2015 +0000
+++ b/main.cpp	Thu Jan 14 16:07:39 2016 +0000
@@ -40,11 +40,11 @@
 {
     static uint16_t usbcounter = 0;
     float meas = getPressure_Pa();
-    setpoint1= ain_setpoint.read()*50000;
-    if(setpoint1 - meas >2000) {
+    setpoint1= ain_setpoint.read()*60000;
+    if(setpoint1 - meas >2500) {
         v1close = 0;
         v1open = 1;
-    } else if (meas - setpoint1 > 2000) {
+    } else if (meas - setpoint1 > 2500) {
         v1close = 1;
         v1open = 0;
     } else