     counter++;
     if (counter == 24) {
       counter = 0;
-      digitalWrite(redLed, HIGH);
+      digitalWrite(bpmLed, HIGH);
     }
     if (counter == 23) {
-      digitalWrite(redLed, HIGH);
+      digitalWrite(bpmLed, HIGH);
     }
 
     if (counter == 6) {
-      digitalWrite(redLed, LOW);
+      digitalWrite(bpmLed, LOW);
     }
   }
 
   if (realtimebyte == START || realtimebyte == CONTINUE) {
     counter = 0;
-    digitalWrite(redLed, HIGH);
+    digitalWrite(bpmLed, HIGH);
   }
 
   if (realtimebyte == STOP) {
-    digitalWrite(redLed, LOW);
+    digitalWrite(bpmLed, LOW);
   }
 }
 


}

void setup()
{
  pinMode(ledPin, OUTPUT);
  pinMode(redLed, OUTPUT);
  Serial.begin(9600);
  usbMIDI.setHandleNoteOff(OnNoteOff);
  usbMIDI.setHandleNoteOn(OnNoteOn);
  digitalWrite(ledPin, HIGH);
  delay(1000);
  digitalWrite(ledPin, LOW);
  delay(1000);
  usbMIDI.setHandleRealTimeSystem(RealTimeSystem);
  usbMIDI.setHandleSysEx(SystemExclusiveMessage);
  Serial.println("start");
}

void loop()
{
  usbMIDI.read();
}

void RealTimeSystem(byte realtimebyte) {

#include <Bounce2.h>

#include <Adafruit_GFX.h>

#include <SPI.h>

#include <Wire.h>

#include <Adafruit_SSD1306.h>

#include "base64/Base64.h"

byte counter;
const byte CLOCK = 248;
const byte START = 250;
const byte CONTINUE = 251;
const byte STOP = 252;
const int ledPin = 13;

const byte channelButtonStart = 0;
//const byte channelButtonLedStart = 14;
const byte numberOfChannelButtons = 2;
const byte ledPins[] = {/*10, 11, 12,*/ 14, 15, 16};
Bounce channelButtons[numberOfChannelButtons];
boolean channelButtonStates[numberOfChannelButtons];
boolean channelButtonDown[numberOfChannelButtons];

const byte bpmLed = 22;


void OnNoteOn(byte channel, byte note, byte velocity)
{
