Multi-channle data plot/streaming/graphing thing

Hi guys,

I needed a thing to graph data sent from arduino for my UAV thing, so I put together a program in C# using the excellent ZedGraph graphing libraries.

It allows you to graph upto 10 different channels on one graph (limited only because I couldn't come up with more line colours), and you can change how many samples you want to store in the graph. You can zoom in to the graph, save a picture n'stuff.

It is not super fast, i.e. not meant to be an oscilloscope, but 100Hz is not a problem.

Here's a link to the download: https://sites.google.com/site/iluvtocnc/DataPlot3.zip

Here's a test sketch:

void setup() {
  // initialize the serial communication:
  Serial.begin(9600);
}

void loop() {
  Serial.print(analogRead(A0));
  Serial.print(',');
  Serial.print(analogRead(A1));
  Serial.print(',');
  Serial.print(analogRead(A2));
  Serial.print(',');
  Serial.print(analogRead(A3));
  Serial.print(',');
  Serial.print(analogRead(A4));
  Serial.print(',');
  Serial.println(analogRead(A5));
  delay(10);
}

I apologize in advance for any crashes from bugs, the user inputs have zero error checking, since this was a Sunday afternoon job. This is a .net program, so you may need to have .net framework to get it working. I have only tested this on Win 7.

-Z-

I have a lot of people ask me for the code, it's here!!!! ############################
I have posted in the source code here: http://arduino.cc/forum/index.php/topic,80466.0.html

THANKS! I'm running it now....

Hi,
I have some questions about it. If system has 5 input and If you send to PC 5 different data over serial simultaneously. How didnt you mixed data which comes from arduino,in C#?
How do u split the data which is comes from arduino, in C#?
(My idea is u must order each data like data1s, data2s, data3s, data4s, data5s. Then data1 consists of data1s...etc. I will try it asap.)
Could you show us to your c# codes? (meanwhile I couldnt tried your program just because of my arduino always connects COM28 :wink: )
Regards

yes, I have the same question that cengav4r. How do you to assign each line Data with one of the data that you want to print?. (Arduino One)

You can send 5 channels from arduino if you print like this, as shown in the first post:

  Serial.print(analogRead(A0));
  Serial.print(',');
  Serial.print(analogRead(A1));
  Serial.print(',');
  Serial.print(analogRead(A2));
  Serial.print(',');
  Serial.print(analogRead(A3));
  Serial.print(',');
  Serial.print(analogRead(A4));
  Serial.print(',');
  Serial.println(analogRead(A5));

If you need to connect to higher COM ports just type it into the text box.

Zitron,

This is off topic, but you developed a quick simconnect inteface for FSX to test a head tracker - see your post here: Arduino 3DOF Head Tracker - Exhibition - Arduino Forum

In it, you mention "I've got a program that interfaces with FSX camera control and serial port, all you need to do is send a comma separated string of pitch, roll yaw and so on. Should make it easy for anyone wanting to control FSX camera from arduino."

Any chance you might still have the simconnect interface (or code) that I can get?

Thanks -

FlyBlueSkies

zitron:
You can send 5 channels from arduino if you print like this, as shown in the first post:

  Serial.print(analogRead(A0));

Serial.print(',');
  Serial.print(analogRead(A1));
  Serial.print(',');
  Serial.print(analogRead(A2));
  Serial.print(',');
  Serial.print(analogRead(A3));
  Serial.print(',');
  Serial.print(analogRead(A4));
  Serial.print(',');
  Serial.println(analogRead(A5));




If you need to connect to higher COM ports just type it into the text box.

In order to using ",". I had solved that problem with
adding Serial.println("A0" + Value);
on arduino firmware and delete it at C#.
Regards
Cenk

flyblueskies:
Zitron,

This is off topic, but you developed a quick simconnect inteface for FSX to test a head tracker - see your post here: Arduino 3DOF Head Tracker - Exhibition - Arduino Forum

In it, you mention "I've got a program that interfaces with FSX camera control and serial port, all you need to do is send a comma separated string of pitch, roll yaw and so on. Should make it easy for anyone wanting to control FSX camera from arduino."

Any chance you might still have the simconnect interface (or code) that I can get?

Thanks -

FlyBlueSkies

Holy crap that is 2009. I don't even use delphi any more. The program is here http://iluvtocnc.googlepages.com/CockpitCamera.zip I have no idea if it still works. I will have a look around for the source if you really want it.

zitron:
Holy crap that is 2009. I don't even use delphi any more. The program is here http://iluvtocnc.googlepages.com/CockpitCamera.zip I have no idea if it still works. I will have a look around for the source if you really want it.

Yep, knew that it was a shot in the dark. Glad you still had the link. Source code would be nice, but if you don't have it, no big deal. I just did not want to start from scratch.

Thanks for the link...I'll give it a try.

Hello!
Is it possible if you will not have to define samples...
I mean it is just continuously plotting data?
How would you do that?

Thanks!