I've done some searching, but I can't figure out what I'm doing wrong here. I was wondering whether it's to do with the internal pullup (which I think is 4.7kOhm) on A0.
I've got this circuit (attached below, please ignore the 3.3V pin) which has a potential divider using a 22k and 6,8k resistor to lower the voltage.
The PD across R4 is 1.0 V and R5 is 4.7 V.
When I read the A0 pin, the result is always an unfaltering 1023, whereas I would expect it to be about ~310.
A0 is reading the same voltage as R5 and you stated that was 4.7V which is pretty close to the 5V the nano runs on so 4.7/5 is about 950 counts or so....
if I'm not mistaken Rp2040 uses 3.3v logical levels, that all is more than 3.3v will outputs from analogread() as 1023.
Be careful when applying more than 3.3V to the analog input - you can burn the port