// ADC
#define ANALOG_PIN PA0
void setup() {
// put your setup code here, to run once:
// Initialize serial communication with 9600 baud rate
Serial.begin(9600);
//Initialize ADC pin
pinMode(ANALOG_PIN, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
// Read the ADC Value
int adcValue = analogRead(ANALOG_PIN);
//Transmit the ADC value over UART
Serial.print("ADC Value: ");
Serial.println(adcValue);
delay(1000); // this speeds up the simulation
}