Sin wave output with PWM pin output amplitude question

you are correct. I should have posted both codes. I am manually changing the delay value between tests.

This is my schematic:
![Screenshot 2024-01-18 142457|314x101]
(upload://5IuhWPenycP8IXtbCJuBTV7CCxw.png)

I used this website for the RLC calculation for simplicity: RLC Low-Pass Filter Design Tool

R = 10000 Ohms
L = 10mH
C = 10uF

the first code is posted, but this is the first code:

const byte sig[] = {
128,143,159,174,189,202,215,226,
235,243,249,253,255,255,253,249,
243,235,226,215,202,189,174,159,
143,128,112,96,81,66,53,40,
29,20,12,6,2,0,0,2,
6,12,20,29,40,53,66,81,
96,112
};

void setup() {
  pinMode(6, OUTPUT);
}

void loop(){
  for(int i = 0; i<50; i++)
  {
    analogWrite(6,sig[i]);
    delay (20); 
  }
}

The second code is the same, but I changed "delay (20)" to "delay(1)" which should increase the frequency from 1Hz to 20Hz if I am understanding correctly. When I do that, peak voltage decays from approximately 1.15V peak to approximately 0.20V peak.