KIK 01 Prototype 05

Dependencies:   AverageMCP3008 mbed-rtos mbed mcp3008

Fork of KIK01_Proto03 by Ryo Od

Revision:
30:1291e20b1c53
Parent:
29:947992b9904f
Child:
31:3c7e1cd0d947
diff -r 947992b9904f -r 1291e20b1c53 main.cpp
--- a/main.cpp	Thu Oct 19 07:57:15 2017 +0000
+++ b/main.cpp	Thu Oct 19 08:01:49 2017 +0000
@@ -131,13 +131,15 @@
     // set envelope parameters
     envelopeAmplitude.setParam(amplitudeParam);
     envelopeFrequency.setParam(frequencyParam);
+    envelopeNoiseAmplitude.setParam(noiseAmplitudeParam);
 
     frequency = envelopeFrequency.getAmplitude(ticks);
-    amplitude = envelopeAmplitude.getAmplitude(ticks); 
+    amplitude = envelopeAmplitude.getAmplitude(ticks);
+    noiseAmplitude = envelopeNoiseAmplitude.getAmplitude(ticks); 
     
     DcoSetFrequency(frequency);
     DcaSetAmplitude(1, amplitude);  // DCO
-    DcaSetAmplitude(2, amplitude);  // NOS01
+    DcaSetAmplitude(2, noiseAmplitude);  // NOS01
 
     ticks++;
     if (ticks >= envelopeLength) {