-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathesp32_settings.h
More file actions
40 lines (29 loc) · 832 Bytes
/
Copy pathesp32_settings.h
File metadata and controls
40 lines (29 loc) · 832 Bytes
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
#ifndef ESP32_SETTINGS_H
#define ESP32_SETTINGS_H
#include <WiFi.h>
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
#endif
#define BUZZZER_PIN 23
#define buzzer true
#define buzz(freq, duration) \
if (buzzer) { \
tone(BUZZZER_PIN, freq, duration); \
noTone(BUZZZER_PIN); \
}
// Main BMI160 I2C address (as reference clock, must be enabled)
//const uint8_t i2c_main_addr = 0x69;
// Extended BMI160 I2C address (optional)
//const uint8_t i2c_extend_addr = 0x68;
// Brownout detector
const bool brown_en = true;
// IMU reset pin
const uint8_t reset_pin = 25;
// LED indicator pin
const uint8_t led_pin = 13;
// Battery voltage monitoring pin
const uint8_t batt_monitor_pin = 35;
// Battery analog reading to voltage function
float get_battery_voltage(uint32_t milliVolt) {
return 2 * milliVolt * 0.001;
}