-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
41 lines (33 loc) · 967 Bytes
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
const uint EncoderPin[] = {3, 4};
void gpio_callback(uint gpio, uint32_t events);
Encoder encoder(EncoderPin, gpio_callback);
void gpio_callback(uint gpio, uint32_t events) { encoder.update(gpio); }
void loop1();
void setup() {
initializeADC();
temp.Begin();
pinMode(LED_PIN, OUTPUT);
pinMode(16, OUTPUT);
midi.Begin(uart0, 16, 17);
core.launch_task(loop1);
rtc.Begin();
rtc.setDateTime(2022, 11, 29, 5, 12, 1, 00);
}
void loop1() {
while (true) {
digitalWrite(LED_PIN, HIGH);
delay(100);
digitalWrite(LED_PIN, LOW);
delay(100);
// usb_serial.println(system.arithmetic_shift_right(100, 5));
}
}
Note note = Notes(Notes::List::C, 8);
void enc_change(void) { usb_serial.println(encoder.getValue()); }
void loop() {
// midi.sendControlChange(0, 100);
encoder.on_change(&enc_change);
writeFrequency(21, math.abs(encoder.getValue()));
usb_serial.println(rtc.toString());
}