I'm looking for an example sketch of how to conduct a led from an analogue input A1 of my Arduino MEGA 2560. The lead is connected to, for example, D26
Purpose: 5 volt on A0 -> lead on (connected to digital pin D26) 0 Volt on A0 -> Lead out again.
I know that it also works without digital connections, but in a complete setup it must be via the A1.
Thanks in advance for any response, Cees