First part (line25~52)(input and display) print out the slewrate and because the slewrate is the power of(1/2) and the only changing number is the denominator, so my variable is only the power of the counter, if the counter is smaller than 4.
Second Part (line 54~end)(generate waveform) open an array of size 500 to save the output data of the point I generate and I seperated into three part of generating the point , upawrd , not changing and downward. print all the data in the array to draw let pico get the data