Using Serial plotter to show pwm and RC filter

Serial Monitor can go up to 2,000,000 baud rate, but you run into the fact that AnalogRead() takes about 100 usec and you are doing it twice per loop.

You can make it faster with a bit of work: Faster Analog Read? - #5 by mem