added clock for daisychaining

This commit is contained in:
2023-08-13 00:23:51 +03:00
parent adc80bd626
commit f6ba128ab8
2 changed files with 16 additions and 9 deletions

View File

@ -5,7 +5,7 @@
#include <U8g2lib.h>
#include <avr/wdt.h>
#define VERSION "0.9b"
const char version[5] = "V:0.9";
#define SCREEN_ADDRESS 0x3C
@ -24,6 +24,7 @@
#define ANALOGUE_INPUT_1_PIN A7
#define ANALOGUE_INPUT_2_PIN A6
const byte outsPins[6] = { 7, 8, 10, 6, 9, 11 };
const byte clockOutPin = 3;
int CV1Calibration = 0;
int CV2Calibration = 0;
@ -188,6 +189,8 @@ void setup() {
pinMode(outsPins[i], OUTPUT);
}
pinMode(clockOutPin, OUTPUT);
loadState();
u8g2.begin();
@ -211,6 +214,7 @@ void clock() {
// Action on each pulse
if (tickCount == 0) {
sendTriggers();
digitalWrite(clockOutPin, HIGH);
}
//this part gets the Pulse and Ticks ticking
@ -235,6 +239,7 @@ void clock() {
for (byte i = 0; i < 6; i++) {
digitalWrite(outsPins[i], LOW);
}
digitalWrite(clockOutPin, LOW);
}
}
}