From 517eba07644b45de9bd04e655a462310be2a6e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20St=C3=A4ck?= Date: Mon, 4 Mar 2019 08:50:58 +0100 Subject: [PATCH] Output breath sensor value on DAC (from Johan) --- NuEVI.ino | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NuEVI.ino b/NuEVI.ino index cb70076..5baf1bd 100644 --- a/NuEVI.ino +++ b/NuEVI.ino @@ -542,8 +542,7 @@ void setup() { void loop() { breathFilter.input(analogRead(breathSensorPin)); pressureSensor = constrain((int) breathFilter.output(), 0, 4095); // Get the filtered pressure sensor reading from analog pin A0, input from sensor MP3V5004GP - //pressureSensor = analogRead(A0); - //pressureSensor = smooth(analogRead(0), filterVal, smoothedVal); // second parameter determines smoothness - 0 is off, .9999 is max smooth + analogWrite(A14,breathCurve(map(constrain(pressureSensor,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,0,4095))); if (mainState == NOTE_OFF) { if (activeMIDIchannel != MIDIchannel) { activeMIDIchannel = MIDIchannel; // only switch channel if no active note