I need the code.
write it. Try and then show it here and tell how it failed. People will help you but you have to make the effort first.
1 Like
Sorry I disagree, engineers have been doing that for a long time. It is an analog solution that is why the connection to A0. Check this link then do some research with your favorite search engine. You will even find sketches that will do just that.
The second post here has advice on wiring up and testing for your A1/A2 buttons: