Hello everyone
Im trying to reprogramm the 8u2 as generic MIDI device. I got as far as sending hard-coded MIDI-messages to my computer, but i cant catch the serial messages sent from my Arduino and change them to MIDI-messages.
As base file i took the Arduino-usbserial.c
I think my fault lies in taking the wrong variable as input from the atmega:
while (BufferCount--)
{
channelMIDIMessages(RingBuffer_Remove(&USARTtoUSB_Buffer), buffercnt);
if(buffercnt == 2)
{
sendMIDIMessage();
buffercnt = 0;
} else
{
buffercnt++;
}
}
I thought, the function RingBuffer_Remove(&USARTtoUSB_Buffer) returns the byte read from the atmega, but i never get anything from it.