GyroLights  0.1
Oakleaf
projectConfig.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 
13 #include <hal/gpio_types.h>
14 #include <esp_err.h>
15 #include <FastLED.h>
16 #include <driver/ledc.h>
17 
18 
19 
20 
21 
22 
26 namespace conf
27 {
28 
29 /* -------------------------------------------------------------------------- */
30 /* configuration parameters */
31 /* -------------------------------------------------------------------------- */
32 
33 const char WIFI_AP_SSID_PREFIX[] = "ESP32_";
34 const char WIFI_AP_PW[] = "password1234";
35 
36 const int NUM_LEDS_PER_STRIP = 21;
37 const int NUM_STRIPS = 1;
38 const uint8_t MAX_BRIGHTNESS = 80;
39 
40 const int I2C_TIMEOUT_MS = 1000;
41 
42 const float WMA_PARAM_ACCEL = 0.5;
43 
44 
45 const int UNIVERSE = 1;
46 const int UNIVERSE_COUNT = 1;
47 
48 
49 const char BLE_MASTER_NAME[] = "ESP_32";
50 
51 
52 /* -------------------------------------------------------------------------- */
53 /* Pins */
54 /* -------------------------------------------------------------------------- */
55 
56 const gpio_num_t LED_PIN = GPIO_NUM_2;
57 
58 
59 const gpio_num_t PINS_ROTARY_SWITCH[] = {
60 // GPIO_NUM_36,
61 // GPIO_NUM_39,
62  GPIO_NUM_18,
63  GPIO_NUM_17,
64  GPIO_NUM_16,
65 // GPIO_NUM_15, // JTAG PIN
66 // GPIO_NUM_14, // JTAG PIN
67 // GPIO_NUM_13, // JTAG PIN
68 // GPIO_NUM_34
69 };
71 
72 const gpio_num_t PIN_LED_CLOCK = GPIO_NUM_19;
73 const gpio_num_t PIN_LED_DATA_1 = GPIO_NUM_23;
74 // const gpio_num_t PIN_LED_DATA_2 = GPIO_NUM_25;
75 // const gpio_num_t PIN_LED_DATA_3 = GPIO_NUM_26;
76 // const gpio_num_t PIN_LED_DATA_4 = GPIO_NUM_27;
77 // const gpio_num_t PIN_LED_DATA_5 = GPIO_NUM_32;
78 // const gpio_num_t PIN_LED_DATA_6 = GPIO_NUM_33;
79 
80 const gpio_num_t PIN_RF_SWITCH = GPIO_NUM_35;
81 
82 const gpio_num_t PIN_MPU6050_SCL = GPIO_NUM_22;
83 const gpio_num_t PIN_MPU6050_SDA = GPIO_NUM_21;
84 
85 
86 /* -------------------------------------------------------------------------- */
87 /* Do not change */
88 /* -------------------------------------------------------------------------- */
89 
91 
93 
94 const int I2C_GYRO_ADDR = 0x68;
95 
96 const int GYRO_ACCEL_SENSITIVITY = 2;
97 
98 const int G_VAL = (2 << (15 - 2 - GYRO_ACCEL_SENSITIVITY));
99 
100 
101 // uuids from https://www.uuidgenerator.net/ // there is no need to change these
102 const char BLE_SERVICE_UUID_str[] = "018c4715-a90b-7ff1-8c4c-aeed790b0a0a";
103 const char BLE_CHARACTERISTIC_UUID_str[] = "018c4715-f39b-7e59-8928-4a8eda02c6a5";
104 
105 } // namespace conf
106 
Definition: effectsConfig.h:30
const uint8_t MAX_BRIGHTNESS
maximum led brightness value. from 0 (always off) to 255 (maximum possible brightness).
Definition: projectConfig.h:38
const gpio_num_t PIN_LED_CLOCK
Definition: projectConfig.h:72
const gpio_num_t PIN_RF_SWITCH
Input Pullup in Hardware.
Definition: projectConfig.h:80
const char BLE_CHARACTERISTIC_UUID_str[]
Definition: projectConfig.h:103
const gpio_num_t PIN_MPU6050_SCL
Definition: projectConfig.h:82
const gpio_num_t PIN_LED_DATA_1
Definition: projectConfig.h:73
const int UNIVERSE
First DMX Universe to listen for.
Definition: projectConfig.h:45
const char BLE_SERVICE_UUID_str[]
Definition: projectConfig.h:102
const float WMA_PARAM_ACCEL
parameter in weighted moving average . lower value: more immediate response, higher value may reduce...
Definition: projectConfig.h:42
const gpio_num_t PIN_MPU6050_SDA
Definition: projectConfig.h:83
const char BLE_MASTER_NAME[]
this has to be the same name for a pair of lights
Definition: projectConfig.h:49
const char WIFI_AP_SSID_PREFIX[]
first part of the access point ssid. second part are the last 6 characters of the mac address in hex.
Definition: projectConfig.h:33
const int UNIVERSE_COUNT
Total number of Universes to listen for, starting at UNIVERSE.
Definition: projectConfig.h:46
const int G_VAL
Definition: projectConfig.h:98
const char WIFI_AP_PW[]
password of the configuration access point
Definition: projectConfig.h:34
const int I2C_GYRO_ADDR
Definition: projectConfig.h:94
const int NUM_PINS_ROTARY_SWITCH
Definition: projectConfig.h:90
const int I2C_TIMEOUT_MS
Definition: projectConfig.h:40
const gpio_num_t LED_PIN
Definition: projectConfig.h:56
const int NUM_STRIPS
number of led strips
Definition: projectConfig.h:37
const int GYRO_ACCEL_SENSITIVITY
sensitivity of the accelerometer range: 0..3
Definition: projectConfig.h:96
const gpio_num_t PINS_ROTARY_SWITCH[]
all rotary switch pins are pulled up in hardware
Definition: projectConfig.h:59
const int NUM_LEDS_PER_STRIP
number of leds per individual strip
Definition: projectConfig.h:36
const int NUM_LEDS_TOTAL
Definition: projectConfig.h:92