Output breath sensor value on DAC (from Johan)
This commit is contained in:
parent
08fca258c2
commit
517eba0764
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue