Skip to content

Commit eb7b78d

Browse files
committed
Change TX/RX bits
Signed-off-by: Warren Gill <[email protected]>
1 parent e3294a4 commit eb7b78d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

midiTranslator/midiTranslator.ino

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
#define LCD_ROWS 4 // Number of rows on the LCD
4141
#define MIDI_PANIC_TIME 1500 // How long a button press to invoke the MIDI panic
4242
#define RESET_BUTTON_TIME 5000 // How long the button has been pressed to initiate a reset
43+
#define RX 0
44+
#define TX 1
4345

4446
#define encoder0PinA 2 // The rotary encoder is attached to pins 2 and 4
4547
#define encoder0PinB 4 // and ground of course
@@ -66,7 +68,7 @@ char* midiParameterName[] = { "Channel: ",
6668

6769
// The sounds I have for each MIDI channel on my sound module
6870
char* midiChannelMessages[] = {
69-
"MIDI Babel Fish 0.82",
71+
"MIDI Babel Fish 0.83",
7072
"01 Grand ",
7173
"02 Hammond",
7274
"03 Rhodes ",
@@ -152,6 +154,9 @@ void setup() {
152154
digitalWrite(encoder0PinA, HIGH);
153155
pinMode(encoder0PinB, INPUT);
154156
digitalWrite(encoder0PinB, HIGH);
157+
pinMode(TX, OUTPUT);
158+
digitalWrite(RX, HIGH);
159+
pinMode(RX, INPUT);
155160

156161
// Set up the rotary encoder
157162
attachInterrupt(0, doEncoder, CHANGE); // encoder pin on interrupt 0 (pin 2)
@@ -163,7 +168,8 @@ void setup() {
163168
// Initiate MIDI communications, listen to all channels, turn off thru mode
164169
MIDI.begin(MIDI_CHANNEL_OMNI);
165170
// By default, the MIDI library sends everything THRU. We do NOT want that!
166-
MIDI.turnThruOff();
171+
// Either call MIDI.turnThruOff(); in your setup or
172+
// #define COMPILE_MIDI_THRU 0 in the library's MIDI.h
167173

168174
// Connect MIDI status changes involving a channel to handlers
169175
MIDI.setHandleNoteOn(HandleNoteOn);

0 commit comments

Comments
 (0)