I want to get a low voltage on output pin of Arduino mega. I have connected Pin 46 to A3, and wrote 120 value to 46 port. Expected was to get 2-3v on A3 input pin. Instead I always get 1023 values as input. Am I doing something wrong ?
void setup(){
Serial.begin(9600);
pinMode(46, OUTPUT);
pinMode(A3,INPUT);
}
void loop(){
analogWrite(46,120);
Serial.println(analogRead(A3));
}