Debugging #281
Unanswered
spectraljules
asked this question in
Q&A
Debugging
#281
Replies: 1 comment
-
If you omit the MIDI part, do you have data coming into your SoftwareSerial RX? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Programming an ATTiny85 and just trying to get it to blink on PC to indicate that the ATtiny is receiving MIDI. See anything wrong with my code?
I keep going over my breadboard looking for errors with the MIDI in wiring and not seeing any.
#include <MIDI.h>
#include <SoftwareSerial.h>
SoftwareSerial midiSerial(3, 4); //RX, TX
MIDI_CREATE_INSTANCE(SoftwareSerial, midiSerial, softMidi);
void setup() {
pinMode(0, OUTPUT);
softMidi.begin(12); //begins MIDI receiving on channel 12
softMidi.setHandleProgramChange(programchange);
softMidi.setHandleControlChange(ccchange);
}
void loop() {
softMidi.read();
}
void programchange(byte channel, byte patchno) {
digitalWrite(0, HIGH);
delay(500);
digitalWrite(0, LOW);
delay(500);
}
void ccchange (byte channel, byte ccno, byte ccval) {
}
Beta Was this translation helpful? Give feedback.
All reactions