Update: Here is a link to my source code. Some very simple examples, without the buttons, saving data etc.
This code is for those that want to draw fancy graphs with processing, and use the fasted method to communicate with the Arduino.
- Serially sending arrays for different graphs from the chip
void PlottArray(int Cmd,int Array1,int Array2) Cmd -> which graph is this data for? Array1 -> The real time array. Measured micro-seconds Array2 -> Array of measured voltages
- Serially sending updates for different graphs from the chip
- A graph class that makes graphing simple with Processing. Drawing bar graphs, smooth line graphs etc can be quite a mission..
You just have to declare a graph object: Graph VoltageAndCurrent;
VoltageAndCurrent.xMax=int(max(timeArray1)); VoltageAndCurrent.yMax=int(max(voltageArray)); VoltageAndCurrent.DrawAxis(); VoltageAndCurrent.smoothLine(timeArray1,voltageArray,currentArray);
- Saving and loading data to a text file
- Efficient serial link to the Arduino (Error checking etc)