analogWrite will never go below 0V or above 5V.  It will be a square wave with a certain duty cycle of 0 to 100 %..    Once I get my oscilloscope I will post pictures. 

127 : 50%:  05050505050505….

The commands I used were different than what I will use with Arduino.  Arduino does have analog pins.   They also have a digital pins with a ~ (tilde) next to them for PWM.  You can use analogWrite command. Now the difference is Arduino uses 0 to 255 or an 8 bit value for PWM.

0 = low = 0 volts
255 =  high = 5V volts

To do a 50% duty cycle you will use 127, which is about 1/2 of 255.   My example will use pin ~9.  I guess you could use 128. 

int ledRed = 9;
int dutyCycle = 127;

 void setup() {
    analogWrite(ledRed, dutyCycle)
}

Checkout my ard_motor_pwm project in the menu for a short video. 

Date: 1.28.2022
First use of Siglent SDS1104X-E 100 MHz 4 Channel Oscilloscope using Arduino PWM signal.

// By Michael A. McKenney
// Arduino PWM
//Date: 2.28.22

#include
int PWM_IO = 6;

void setup() {
Serial.begin(9600);
Wire.begin(0x4); // join i2c bus with address #4
pinMode(6, OUTPUT);
}

void loop() {
analogWrite(PWM_IO, 0);
}
// By Michael A. McKenney
// Arduino PWM
//Date: 2.28.22

#include <Wire.h>
int PWM_IO = 6;

void setup() {
Serial.begin(9600);
Wire.begin(0x4); // join i2c bus with address #4
pinMode(6, OUTPUT);
}

void loop() {
analogWrite(PWM_IO, 64);
}
// By Michael A. McKenney
// Arduino PWM
//Date: 2.28.22

#include <Wire.h>
int PWM_IO = 6;

void setup() {
Serial.begin(9600);
Wire.begin(0x4); // join i2c bus with address #4
pinMode(6, OUTPUT);
}

void loop() {
analogWrite(PWM_IO, 128);
}
// By Michael A. McKenney
// Arduino PWM
//Date: 2.28.22

#include <Wire.h>
int PWM_IO = 6;

void setup() {
Serial.begin(9600);
Wire.begin(0x4); // join i2c bus with address #4
pinMode(6, OUTPUT);
}

void loop() {
analogWrite(PWM_IO, 192);
}
// By Michael A. McKenney
// Arduino PWM
//Date: 2.28.22

#include <Wire.h>
int PWM_IO = 6;

void setup() {
Serial.begin(9600);
Wire.begin(0x4); // join i2c bus with address #4
pinMode(6, OUTPUT);
}

void loop() {
analogWrite(PWM_IO, 255);
}