Hi, maybe this has been answered but I couldn't find anything.
When pin 10 on my mega is HIGH I get 3.3 volts. Is this because it is a special PWM pin?
Pin 22 is 5v when HIGH so I just switched pins, but I was hoping for an explanation and possible work around if I needed to use that pin at 5v.
Thanks for reading, I apologize if this is obvious or previously answered, I did search google and the forum before posting.
//This will produce 3.3vdc at pin 10 and 5vdc at pin 22 on my MEGA 2560
void setup() {
// initialize the digital pins as an outputs.
pinMode(22, OUTPUT);
pinMode(10, OUTPUT);
}
void loop() {
digitalWrite(22, HIGH);
digitalWrite(10, HIGH);
}
It's connected to a 5VDC relay. Pin 22 has no problem engaging the relay with this code, but 10 will not. when I attach my multimeter pin 10 has 3.3v, and 22 has 5v.
I have had this happen when I done this in my setup, but I assumed it was a function of the arduino:
I had LEDs hooked up to the output pin and it would only dimly turn them on. When I removed the digitalWrite everything worked properly. But this time I didn't do that, and I'm still only getting 3.3VDC on pin 10.
I see a lot of posts with people trying to get 3.3vdc from a digital out. I should just give them my MEGA. LOL.
I should clarify that when the setup had the digitalWrite(10, LOW) and the led would only turn on very dim, it was an uno, and a completely different project.