From 35653d25e33d55d0d39be1bf70a99dc0b0f21a2a Mon Sep 17 00:00:00 2001 From: true Date: Thu, 24 Jul 2025 06:23:14 -0700 Subject: [PATCH] changed ADC range for pot; ADC seems to work fine now this chip uses 12-bit ADC, vs 10-bit on old chip. I tried to limit the pot within a small range, but it still wasn't working as expected until I did this. have no idea. don't code without sleep. --- firmware/retro_tech_fw/code/src/adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/retro_tech_fw/code/src/adc.c b/firmware/retro_tech_fw/code/src/adc.c index aeb1310..9cd57a4 100644 --- a/firmware/retro_tech_fw/code/src/adc.c +++ b/firmware/retro_tech_fw/code/src/adc.c @@ -16,7 +16,7 @@ // deadzone fudge factors for potentionmeter. test on actual badge // and see if necessary, or if pot hardware + adc periph is good enough #define POT_LO 40 -#define POT_HI (1024-POT_LO) +#define POT_HI (4096-POT_LO)