Restructure and clarify defined constants

This commit is contained in:
John Stäck 2019-06-25 13:20:40 +02:00
parent bc31cb9eef
commit 416b2a1730
2 changed files with 30 additions and 14 deletions

View file

@ -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
// No note is sounding
@ -38,14 +50,15 @@ PROGRAMME FUNCTION: EVI Wind Controller using the Freescale MP3V5004GP breath
// A note is sounding
#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)
#error "USB MIDI not enabled. Please set USB type to 'MIDI' or 'Serial + MIDI'."
#endif
//Magic value where pinky button means "pitch bend"
#define PBD 12
//Vibrato direction
#define UPWD 1
#define DNWD 0
//_______________________________________________________________________________________________ DECLARATIONS

View file

@ -10,37 +10,40 @@
#define specialKeyPin 0 // SK or S2
#define halfPitchBendKeyPin 1 // PD or S1
//Capacitive sensor pins (on-board teensy)
#define bitePin 17
#define extraPin 16
#define pbUpPin 23
#define pbDnPin 22
#define vibratoPin 15
//Pins jumpered to enable bite pressure sensor
#define biteJumperPin 11
#define biteJumperGndPin 12
#define biteJumperPin 11 //PBITE
#define biteJumperGndPin 12 //PBITE
//Analog pressure sensors. Breath and optional bite
#define breathSensorPin A0
#define bitePressurePin A7
//Digital pins for menu buttons
#define dPin 3
#define ePin 4
#define uPin 5
#define mPin 6
//Output pins for LEDs (breath, power, status)
#define bLedPin 10
#define pLedPin 9
#define statusLedPin 13
//Analog input for measuring voltage
#define vMeterPin A11
//DAC outputs for analog and pwm
#define dacPin A14
#define pwmDacPin 20
#define PBD 12
#define UPWD 1
#define DNWD 0
//Which serial port to use for MIDI
#define MIDI_SERIAL Serial3