KIK01 Release

Dependencies:   mcp3008 mbed mbed-rtos AverageMCP3008 VoltageMonitor

Revision:
7:6735a343780e
Parent:
6:897d6392b408
Child:
8:bb34a4894337
--- a/main.cpp	Sun Jun 04 09:32:30 2017 +0000
+++ b/main.cpp	Sun Jun 04 09:36:09 2017 +0000
@@ -160,7 +160,7 @@
     amplitude = envelopeAmplitude.getAmplitude(envelopeTicks);
 
     envelopeTicks++;
-    if (envelopeTicks == envelopeLength) {
+    if (envelopeTicks >= envelopeLength) {
         envelopeTicks = 0;
     }
 }
@@ -168,7 +168,7 @@
 void update()
 {
     ticks++;
-    if (ticks == SAMPLING_RATE / 1000) {
+    if (ticks >= SAMPLING_RATE / 1000) {
         ticks = 0;
         
         // set envelope parameters