Here are two lines of my code:
USART_println(“ans:”);
USART_println(analogRead(A0));
The result i get is (the script is being looped):
ans:ans:ans:ans:ans:ans:ans:ans:ans:
I have checked my pins and am sure they are connected correctly.
I have tried 2 different sensors. I am writing the code in C using VScode.
Does anyone have an idea why analogRead returns nothing?
I have included <Arduino.h>