Rev 6 #1
@ -5,11 +5,10 @@
|
||||
#include <U8g2lib.h>
|
||||
#include <avr/wdt.h>
|
||||
|
||||
const char version[5] = "V:1.0";
|
||||
const char version[5] = "MIDI Test";
|
||||
|
||||
#define SCREEN_ADDRESS 0x3C
|
||||
|
||||
|
||||
#define PPQN 24
|
||||
#define PULSE_LENGTH 12 //ms (with 12 ms you can't get higher than 208bpm)
|
||||
#define MAXBPM 200 //250 at 24ppqn with 5ms pulse will be 50/50 square wave
|
||||
@ -183,6 +182,7 @@ const uint8_t fabryka[450] U8G2_FONT_SECTION("fabryka") =
|
||||
|
||||
void setup() {
|
||||
//Serial.begin(9600);
|
||||
Serial.begin(31250);
|
||||
|
||||
pinMode(ENC_BTN_PIN, INPUT_PULLUP);
|
||||
pinMode(START_STOP_BTN_PIN, INPUT_PULLUP);
|
||||
@ -213,6 +213,10 @@ void loop() {
|
||||
checkInputs();
|
||||
}
|
||||
|
||||
void sendMIDIClock() {
|
||||
Serial.write(0xF8);
|
||||
}
|
||||
|
||||
void clock() {
|
||||
if (isPlaying) {
|
||||
|
||||
@ -220,6 +224,7 @@ void clock() {
|
||||
if (tickCount == 0) {
|
||||
sendTriggers();
|
||||
digitalWrite(clockOutPin, HIGH);
|
||||
sendMIDIClock();
|
||||
}
|
||||
|
||||
//this part gets the Pulse and Ticks ticking
|
||||
|
||||
Reference in New Issue
Block a user