Hello,
This might be a silly question however I was wondering why my Arduino is outputting around 3.4V on a digital pin that I have set to low. My code for the project is:
'''
int pos = 9;
int gnd = 6;
void setup() {
pinMode(pos, OUTPUT);
pinMode(gnd, OUTPUT);
digitalWrite(pos, HIGH);
digitalWrite(gnd, LOW);
}
'''
For right now I am not using the void loop section of the code. The Arduino is connected to a relay and the relay will only switch terminals no-nc or vice versa when one of the terminals is at 5V and the other is at 0v. The 5V terminal in my code is represented by pos and the 0V terminal is represented by gnd. The 5V high output is outputting correctly; however, as mentioned, the 0V low output is really outputting 3.4V. I'm curious if anyone has an answer for this. The best guess I have is the voltage is somehow bleeding into that pin since it isn't supposed to be 100% a ground pin.
Thanks to anyone who can help.