SAADC differential input setup. With EPD display.
Dependencies: GDEP015OC1 acn_nrf52_saadc adc52832_common
Diff: main.cpp
- Revision:
- 3:884740fe7de4
- Parent:
- 2:49dab8d9637a
- Child:
- 4:7dd2d8cc90ed
--- a/main.cpp Fri Sep 29 08:56:53 2017 +0000 +++ b/main.cpp Fri Sep 29 09:02:34 2017 +0000 @@ -16,8 +16,8 @@ #include "acd_nrf52_saadc.h" #include "GDEP015OC1.h" -#define ANALOG_PIN_P (5) -#define ANALOG_PIN_N (6) +#define ANALOG_PIN_P (4) +#define ANALOG_PIN_N (5) #define PRINT (1) #if PRINT @@ -33,7 +33,7 @@ GDEP015OC1 epd = GDEP015OC1(spi, p5, p6, p7, p8); int main(void){ - NRF52_SAADC pot(ANALOG_PIN_P, ANALOG_PIN_N); + NRF52_SAADC pot(ANALOG_PIN_P+1, ANALOG_PIN_N+1); int16_t rawData; float voltage;