So I've just migrated to STM32 Black Pill from my Arduino UNO. I've simply copied the Arduino code into the Black Pill using this method. On my arduino I was using a pressure sensor powered with 5V and reference pin to 3.3V. In the Black Pill I've done the same and connected the 5V and the 3.3V to those same wires going to the sensor. I've connected the signal output wire to A0 in the Black Pill to read the analogue signal. I have the following issues...
Unlike the Arduino, I am not getting a linear output here. Tested against a manometer, for equal level of pressure rise I am not getting equal ADC reading change.
The ADC values start at 318 and end at 330. I am unable to rise beyond 330.
I would like to know the reasons for these issues and their solution
I would like to know how many ADC divisions does this board have and how many volts can it measure.