Restructure and clarify defined constants
This commit is contained in:
parent
bc31cb9eef
commit
416b2a1730
2 changed files with 30 additions and 14 deletions
|
@ -25,6 +25,18 @@ PROGRAMME FUNCTION: EVI Wind Controller using the Freescale MP3V5004GP breath
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
//Make sure compiler is set to the appropriate platform
|
||||||
|
#ifndef __MK20DX256__
|
||||||
|
#error "Wrong target platform. Please set to Teensy 3.1/3.2 (MK20DX256)."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(USB_MIDI) && !defined(USB_MIDI_SERIAL)
|
||||||
|
#error "USB MIDI not enabled. Please set USB type to 'MIDI' or 'Serial + MIDI'."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The three states of our main state machine
|
// The three states of our main state machine
|
||||||
|
|
||||||
// No note is sounding
|
// No note is sounding
|
||||||
|
@ -38,14 +50,15 @@ PROGRAMME FUNCTION: EVI Wind Controller using the Freescale MP3V5004GP breath
|
||||||
// A note is sounding
|
// A note is sounding
|
||||||
#define NOTE_ON 3
|
#define NOTE_ON 3
|
||||||
|
|
||||||
//Make sure compiler is set to the appropriate platform
|
|
||||||
#ifndef __MK20DX256__
|
|
||||||
#error "Wrong target platform. Please set to Teensy 3.1/3.2 (MK20DX256)."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(USB_MIDI) && !defined(USB_MIDI_SERIAL)
|
//Magic value where pinky button means "pitch bend"
|
||||||
#error "USB MIDI not enabled. Please set USB type to 'MIDI' or 'Serial + MIDI'."
|
#define PBD 12
|
||||||
#endif
|
|
||||||
|
//Vibrato direction
|
||||||
|
#define UPWD 1
|
||||||
|
#define DNWD 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//_______________________________________________________________________________________________ DECLARATIONS
|
//_______________________________________________________________________________________________ DECLARATIONS
|
||||||
|
|
|
@ -10,37 +10,40 @@
|
||||||
#define specialKeyPin 0 // SK or S2
|
#define specialKeyPin 0 // SK or S2
|
||||||
#define halfPitchBendKeyPin 1 // PD or S1
|
#define halfPitchBendKeyPin 1 // PD or S1
|
||||||
|
|
||||||
|
|
||||||
|
//Capacitive sensor pins (on-board teensy)
|
||||||
#define bitePin 17
|
#define bitePin 17
|
||||||
#define extraPin 16
|
#define extraPin 16
|
||||||
#define pbUpPin 23
|
#define pbUpPin 23
|
||||||
#define pbDnPin 22
|
#define pbDnPin 22
|
||||||
#define vibratoPin 15
|
#define vibratoPin 15
|
||||||
|
|
||||||
|
//Pins jumpered to enable bite pressure sensor
|
||||||
|
#define biteJumperPin 11
|
||||||
|
#define biteJumperGndPin 12
|
||||||
|
|
||||||
#define biteJumperPin 11 //PBITE
|
//Analog pressure sensors. Breath and optional bite
|
||||||
#define biteJumperGndPin 12 //PBITE
|
|
||||||
|
|
||||||
#define breathSensorPin A0
|
#define breathSensorPin A0
|
||||||
#define bitePressurePin A7
|
#define bitePressurePin A7
|
||||||
|
|
||||||
|
//Digital pins for menu buttons
|
||||||
#define dPin 3
|
#define dPin 3
|
||||||
#define ePin 4
|
#define ePin 4
|
||||||
#define uPin 5
|
#define uPin 5
|
||||||
#define mPin 6
|
#define mPin 6
|
||||||
|
|
||||||
|
//Output pins for LEDs (breath, power, status)
|
||||||
#define bLedPin 10
|
#define bLedPin 10
|
||||||
#define pLedPin 9
|
#define pLedPin 9
|
||||||
#define statusLedPin 13
|
#define statusLedPin 13
|
||||||
|
|
||||||
|
//Analog input for measuring voltage
|
||||||
#define vMeterPin A11
|
#define vMeterPin A11
|
||||||
|
|
||||||
|
//DAC outputs for analog and pwm
|
||||||
#define dacPin A14
|
#define dacPin A14
|
||||||
#define pwmDacPin 20
|
#define pwmDacPin 20
|
||||||
|
|
||||||
#define PBD 12
|
|
||||||
#define UPWD 1
|
|
||||||
#define DNWD 0
|
|
||||||
|
|
||||||
//Which serial port to use for MIDI
|
//Which serial port to use for MIDI
|
||||||
#define MIDI_SERIAL Serial3
|
#define MIDI_SERIAL Serial3
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue