I want to use “common GPIO expansion connector” of OpenCR board to interface analog signal.
As I want to use BDPIN_GPIO_1 as Analog input 0, I modified “variant.cpp”:
{GPIOA, GPIO_PIN_0, NULL, NO_ADC , NULL , NO_PWM , NO_EXTI }, // 16 A0
. . .
{GPIOB, GPIO_PIN_10, &hADC3, ADC_CHANNEL_0 , NULL , NO_PWM , NO_EXTI }, // 50 BDPIN_GPIO_1
But this seems not be enough and analogRead(A0) returns wrong answer.
Is there any suggestion to this ?