Thanks for helping ! =)
Am i right to place the VoltsQ.Count>2 as follows, please correct me if i'm wrong.
Code:If VoltsQ.Count > 2 'Put your code for drawing the axes etc. here. 'Details of the graph layout -- fill in your own values here! Dim Origin As New Point(50, 119) Dim xAxisLength As Integer = 210 Dim yAxisLength As Integer = -120 'Turn the queue into an array: Dim voltsQarray As Single() = voltsQ.ToArray 'Define an array of data points: Dim DataPoints(voltsQ.Count - 1) As Point Dim x, y As Integer 'Fill in the array using the voltage readings: For i As Integer = 0 To voltsQ.Count - 1 'Get the volts value from the queue: Dim v As Single = voltsQarray(i) 'Find the distance along the x axis: x = Origin.X + CInt(i * xAxisLength / 40) 'find the height of the data point on the Y axis: y = Origin.Y + CInt(v * yAxisLength / maxVolts) 'Put the point in the array DataPoints(i) = New Point(x, y) Next 'Draw the waveform: e.Graphics.DrawCurve(Pens.Green, DataPoints) End If
Btw, after placing all the code into the program, this is what i observe [ please see attached image ] Hmm.. its still a straight line though but it is varying quantity against time. So i believe its correct ?![]()




Reply With Quote