// constants (or #define with no ; at end of line) won't change. They're used here to set pin numbers:
int RedPin = 9;
float voltage = 0.00;
// Variables will change:


void setup() {
pinMode (RedPin, OUTPUT);
Serial.begin(115200);
  
  }

void loop() {
for (int x=0; x< 256; x++){
analogWrite (RedPin, x);
delay(50);
voltage = x /50.00;
Serial.print(x);
Serial.print(" = ");
Serial.print(voltage);
Serial.println(" volts");

}
delay(1000);
for (int x=0; x< 256; x++){
analogWrite (RedPin, 255-x);
voltage = (255-x) /50.00;
Serial.print(255-x);
Serial.print(" = ");
Serial.print(voltage);
Serial.println(" volts");

delay(50);
}
delay(1000);
      
  }