Actually the question was about a DVM not sure if it's the same. But thanks anyway.
Yes you are right. The code for proof of concept is:
#define pwmPin 6
#define digitalPin 7
void setup()
{
pinMode(pwmPin, OUTPUT);
pinMode(digitalPin, OUTPUT);
}
void loop()
{
analogWrite(pwmPin, 255);
digitalWrite(digitalPin, HIGH);
}
Correct and I don't have an oscilloscope, still I should get pretty close to 12v since it should be close to 100% using analogWrite(255).
All Working
I'm pretty baffled I re uploaded the code above and now I get 12v (pretty close to 12v) across the leds on both pins.
![]()
I had even taken photos and was going to make a video showing the difference and now it works. Glad that it did, but still, I'm wondering what was wrong since the connections are the same, the components are the same and I had re uploaded the same code more than once and now it works has it should.
Just want to say thanks for everyone that tried to help and apologize for the inconvenient since the problem seems to have magically disappeared. Fingers crossed it doesn't return.
Thanks