Make IntervalTimer stub so simulator works
This commit is contained in:
parent
88b38b3f46
commit
f36129d4bb
3 changed files with 28 additions and 9 deletions
|
@ -261,6 +261,16 @@ bool configManagementMode = false;
|
|||
|
||||
//_______________________________________________________________________________________________ SETUP
|
||||
|
||||
//Update CV output pin, run from timer.
|
||||
void cvUpdate(){
|
||||
int cvPressure = analogRead(breathSensorPin);
|
||||
if(dacModeCopy == DAC_MODE_PITCH){
|
||||
analogWrite(pwmDacPin,cvPressure);
|
||||
} else { //DAC_MODE_BREATH
|
||||
analogWrite(dacPin,map(constrain(cvPressure,brZero,4095),brZero,4095,0,4095));
|
||||
}
|
||||
}
|
||||
|
||||
void setup() {
|
||||
|
||||
analogReadResolution(12); // set resolution of ADCs to 12 bit
|
||||
|
@ -802,15 +812,6 @@ void loop() {
|
|||
|
||||
//_______________________________________________________________________________________________ FUNCTIONS
|
||||
|
||||
void cvUpdate(){
|
||||
int cvPressure = analogRead(breathSensorPin);
|
||||
if(dacModeCopy == DAC_MODE_PITCH){
|
||||
analogWrite(pwmDacPin,cvPressure);
|
||||
} else { //DAC_MODE_BREATH
|
||||
analogWrite(dacPin,map(constrain(cvPressure,brZero,4095),brZero,4095,0,4095));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// non linear mapping function (http://playground.arduino.cc/Main/MultiMap)
|
||||
// note: the _in array should have increasing values
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue