-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.h
44 lines (20 loc) · 968 Bytes
/
configuration.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
42
43
44
#ifndef CONFIGURATION_H
#define CONFIGUARTION_H
#include "hardware/uart.h"
//#define DEBUG
// PIANO SETTINGS
#define NUM_KEYS 88
#define FIRST_KEY 20 // where the first key is relative to the first midi note
// MIDI SETTINGS
#define BUFFER_SIZE 30
#define VISUALISER_CHANNEL 15
// LED SETTINGS
#define LED_PIN 11
#define LEDS_PER_KEY 2
#define NUM_LEDS NUM_KEYS * LEDS_PER_KEY
#define LED_FREQUENCY (uint16_t)90
#define LED_DITHERING 2 // By pulsing between 8 bit values, multiplies resolution by this amount. Beware: Dithering is limited by the max LED speed to (33333/NUM_LEDS)/LED_FREQUENCY and a frequency of ~100Hz is needed to stop visible flickering.
#define LED_STRIP_INVERT true // whether to flip the direction the LEDs are indexed in
#define CURRENT_PER_LED 60 // max (overestimate) per LED in mA to prevent overcurrent
#define MAX_TOTAL_CURRENT 2000 // max current for whole system
#endif