title: Simple way to plot PWM over time
body: <p>I want to plot the PWM emitted by pin 9 and read by pin 0 in a static PWM signal (like an oscilloscope can do). Is there a simple way to do that?</p>
  
  <pre><code>int pwm = 254;
  float pulse1;
  
  void setup() {
    pinMode(9, OUTPUT);
    pinMode(0, INPUT);
    Serial.begin(115200);
  }
  
  void loop() {
    analogWrite(9, pwm);
    pulse1 = pulseIn(0, pwm);
  
    Serial.println(analogRead(0));
  //  Serial.println(pulse1);  
  }
  </code></pre>
  
  <p>I am using an Arduino Uno.</p>