user23967: I can't figure out why the output voltage of analogWrite(255) is less than the voltage of digitalWrite(255). My code and an image of my setup are below. Some other useful information is that I am using the NodeMCU by HiLetgo, 3.3k ohm resistors with the meters, and that the meters use 1mA of current DC at full scale. Thanks for your help!
int pPressure       = D2;
int pPrecipProb     = D1;
int pWindSpeed      = D0;

int mTemperature;
int mHumidity;
int mPressure;
int mPrecipProb;
int mWindSpeed;
int mAlert;

void setup() {
  Serial.begin(9600);
  pinMode(pPrecipProb,   OUTPUT);
  pinMode(pWindSpeed,    OUTPUT);
  pinMode(pPressure,     OUTPUT);
  pinMode(LED_BUILTIN,   OUTPUT);     // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
    mPressure           = (int) constrain(mPressure + 1, 0, 255);
    mPrecipProb         = (int) constrain(mPrecipProb + 1,     0, 255 );
    mWindSpeed          = (int) constrain(mWindSpeed + 1,     0, 255 );

    if(mPressure == 255)
    {
      mPressure = 0;
      mPrecipProb = 0;
      mWindSpeed = 0;
    }

    digitalWrite(pPressure,      HIGH   );
    analogWrite(pPrecipProb,    255 );
    analogWrite(pWindSpeed,     mWindSpeed  );


    delay(10);                    

}


Left: AnalogWrite(255)
Middle: DigitalWrite(HIGH)
Right: the other one that cycles

user3493: First, do something simpler, and eliminate possible causes.

Are you certain the NodeMCU's CPU is an 8bit PWM? If it were
9bits, it would read about 50% full scale, and 10bits would be about
25% of digitalWrite (which is what I think I can see on the photo).
Swap the analogue meters around, and see if the difference is consistent
with the pin, or consistent with the meters.
Use a digital multimeter (DMM) to measure voltage. It should be a
small load. So this should eliminate, or identify, the analogue
meters as a culprit.

If there is still a difference in voltage, do the NodeMCU equivalent of:  
void setup() {
  pinMode(10, OUTPUT);  // a pin capable of analogOut and DigitalOut
}

void loop() {
  digitalWrite(10, HIGH);
  analogWrite(9, 255);  // a pin capable of analogOut and DigitalOut

  delay(100);
}

Then swap 9 and 10. 
If the DMM shows the analogue output is consistently lower, then go back and check that PWM is 8 bits, and the device output range for PWM is the same output voltage as digitalWrite to a GPIO.

23967: <p>I can't figure out why the output voltage of <code>analogWrite(255)</code> is less than the voltage of <code>digitalWrite(255)</code>. My code and an image of my setup are below. Some other useful information is that I am using the NodeMCU by HiLetgo, 3.3k ohm resistors with the meters, and that the meters use 1mA of current DC at full scale. Thanks for your help!</p>

<pre><code>int pPressure       = D2;
int pPrecipProb     = D1;
int pWindSpeed      = D0;

int mTemperature;
int mHumidity;
int mPressure;
int mPrecipProb;
int mWindSpeed;
int mAlert;

void setup() {
  Serial.begin(9600);
  pinMode(pPrecipProb,   OUTPUT);
  pinMode(pWindSpeed,    OUTPUT);
  pinMode(pPressure,     OUTPUT);
  pinMode(LED_BUILTIN,   OUTPUT);     // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
    mPressure           = (int) constrain(mPressure + 1, 0, 255);
    mPrecipProb         = (int) constrain(mPrecipProb + 1,     0, 255 );
    mWindSpeed          = (int) constrain(mWindSpeed + 1,     0, 255 );

    if(mPressure == 255)
    {
      mPressure = 0;
      mPrecipProb = 0;
      mWindSpeed = 0;
    }

    digitalWrite(pPressure,      HIGH   );
    analogWrite(pPrecipProb,    255 );
    analogWrite(pWindSpeed,     mWindSpeed  );


    delay(10);                    

}
</code></pre>

<p><a href="https://i.stack.imgur.com/GEaro.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GEaro.jpg" alt="Left "></a></p>

<p>Left: AnalogWrite(255)</p>

<p>Middle: DigitalWrite(HIGH)</p>

<p>Right: the other one that cycles</p>
 3493: <p>First, do something simpler, and eliminate possible causes.</p>

<ol>
<li>Are you <em>certain</em> the NodeMCU's CPU is an 8bit PWM? If it were
9bits, it would read about 50% full scale, and 10bits would be about
25% of digitalWrite (which is what I think I can see on the photo).</li>
<li>Swap the analogue meters around, and see if the difference is consistent
with the pin, or consistent with the meters.</li>
<li>Use a digital multimeter (DMM) to measure voltage. It should be a
small load. So this should eliminate, or identify, the analogue
meters as a culprit.</li>
</ol>

<p>If there is still a difference in voltage, do the NodeMCU equivalent of:  </p>

<pre><code>void setup() {
  pinMode(10, OUTPUT);  // a pin capable of analogOut and DigitalOut
}

void loop() {
  digitalWrite(10, HIGH);
  analogWrite(9, 255);  // a pin capable of analogOut and DigitalOut

  delay(100);
}
</code></pre>

<p>Then swap 9 and 10. </p>

<p>If the DMM shows the analogue output is consistently lower, then go back and check that PWM is 8 bits, and the device output range for PWM is the same output voltage as digitalWrite to a GPIO.</p>
