I have an Arduino Duemilanove Board to which I attached a current sensor in order to read values of the current flowing through various domestic loads. The circuit also consists of a resistor across which I am reading the voltage via the analog pins of the board. Each value that is read is then plotted using Processing 1.5.
My problem is that while the graph is being plotted, I randomly get strange diagonal lines (resulting from plots of both the axes - colour black - and the graph itself - colour purple).
Can anyone help me understand why this is happening please? I've been over the entire code time and time again and the command for plotting is strictly restricted to the reading from the Arduino board and the plotting of the axes is a simple loop to plot a horizontal/vertical line, I haven't tried to complicate things.
Any help is much appreciated! Thanks!