midilab / uClock

A tight BPM clock generator for Arduino and PlatformIO using hardware timer interruption. AVR, Teensy, STM32xx, ESP32 and RP2040 support
https://midilab.co/umodular
MIT License
153 stars 19 forks source link

Avr patch #26

Closed Jackson-Devices closed 10 months ago

Jackson-Devices commented 10 months ago

Created a Uart based MIDI slave clock example for AVR, tested on an Arduino Uno and based on your existing Leonardo example. Tested at 30-300bpm and works as expected. Minor changes to existing examples - Teensy monitor now has Slave/Master on screen to match Leonardo and this AVR example. All examples bpm=BPM, stoped=Stopped, playing=Playing, slave=Slave and Master=Master. Added Teensy 4.x to comments as I have tested them on a Teensy 4.0.

midilab commented 10 months ago

Hey @Jackson-Devices ,

Thanks for the job. i will merge it.

Just a note about external sync: The ideal way of getting sync would be on another timer task to separate user code from sync mechanism, and running at a rate of 250uS, nowdays i use uCtrl that has builtin this feature.

I will try to add this functionality builtin into the uClock for those who want to ext sync some personal application without screw the sync time.