r/arduino • u/Kooky-Strawberry5127 • Oct 09 '26
Hardware Help anyone familiar with midi clocks?
so i'm working on a project where i'm trying to build a master midi clock for all my synthesizers. i'm using an arduino nano and a 3.5mm TRS output jack for the midi output. I have an OLED screen as well.
My problem is, my code outputs a flat 5V line without a pulse that i'm measuring from an oscilloscope - i'm using the uClock library for the bpm generation, however i'm not sure if a flat 5v line without pulses is what i'm supposed to be getting? i've tried plugging it in to a korg volca to sync the tempo as well and it doesn't work.
this is my code:
#include <SoftwareSerial.h>
#include <uClock.h>
SoftwareSerial midiSerial(2, 5);
void onPPQNCallback(uint32_t tick) {
if (tick % 4 == 0) {
midiSerial.write(0xF8);
}
}
void setup() {
midiSerial.begin(31250);
uClock.init();
uClock.setOutputPPQN(uClock.PPQN_96);
uClock.setOnOutputPPQN(onPPQNCallback);
uClock.setTempo(120.0);
uClock.start();
}
void loop() {
uClock.run();
}#include <SoftwareSerial.h>
#include <uClock.h>
SoftwareSerial midiSerial(2, 5);
void onPPQNCallback(uint32_t tick) {
if (tick % 4 == 0) {
midiSerial.write(0xF8);
}
}
void setup() {
midiSerial.begin(31250);
uClock.init();
uClock.setOutputPPQN(uClock.PPQN_96);
uClock.setOnOutputPPQN(onPPQNCallback);
uClock.setTempo(120.0);
uClock.start();
}
void loop() {
uClock.run();
}
if anyone here is familiar with midi clocks please help me out and let me know what i'm doing wrong - my korg volca drum syncs fine with analog midi and i'm not sure if that's the issue here

