We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f599bb commit 8c38482Copy full SHA for 8c38482
tmk_core/protocol/lufa/adafruit_ble.cpp
@@ -37,9 +37,10 @@
37
#define ConnectionUpdateInterval 1000 /* milliseconds */
38
39
#ifdef SAMPLE_BATTERY
40
-#ifndef BATTERY_LEVEL_PIN
41
-# define BATTERY_LEVEL_PIN 7
42
-#endif
+
+# ifndef BATTERY_LEVEL_PIN
+# define BATTERY_LEVEL_PIN B5
43
+# endif
44
#endif
45
46
static struct {
@@ -556,7 +557,7 @@ void adafruit_ble_task(void) {
556
557
if (timer_elapsed(state.last_battery_update) > BatteryUpdateInterval && resp_buf.empty()) {
558
state.last_battery_update = timer_read();
559
- state.vbat = analogRead(BATTERY_LEVEL_PIN);
560
+ state.vbat = analogReadPin(BATTERY_LEVEL_PIN);
561
}
562
563
0 commit comments