#### Howdy, Stranger!

We are about to switch to a new forum software. Until then we have removed the registration on this forum.

# Line graph (Final year Semester project help. Project not related to coding)

edited October 2017 in Arduino

Hi Guys and girls.

I am a mechanical Engineering student on my final year semester.

Processing / Arduino code is not part of my school and I mess around with this in my spare time as it interests me. I need help from you Guys. I can log, plot and graph what I need with my Arduino, sensors and spread sheet. But would like to make it a bit more cool and dynamic. I can make it Work on Arduino LCD also. But.. Would like to make it work in processing as its more appealing to the eye to look at a dynamic graph in processing than on a tiny crap LCD.

I log 40 infrared temperature sensors over a 400 mm long distance. Sensor are mounted in-line. I log temperatures during a drying process over that 400mm distance. I would like your help to make a dynamic graph of this.

X: Represent the 400mm drying distance. Y: Temperature

Draw a line from value of sensor one to value of sensor two. Draw line from value of sensor two to sensor three... Etc...

40 values sent, each separated with comma, last value is line shit.

Thank you so much. I don't have much time to study up on coding for processing so I just ask for any help with the code so I can move on and focus on actual project.

Tagged:

• hahaha... last line is not line shit.. but line shift.

• go back edit your post: gear | edit

• ``````String[] list = {"111", "145", "45", "21"};

// ---------------------------------------------------------

void setup() {
size(400, 400);

background(255);
}

void draw() {

background(255);

for ( int i = 0; i < list.length-1; i++ )

{

line ( i * 30, float(list[i]),
(i+1)*30, float(list[i+1]));
}
}
``````
• Thank you for the help but program don't work. I am complete idiot within processing.

It just draws a line with the numbers you write in String list....

Serial port data is like this: (40 values in total)

Value, Value, Value, Value, Value,........ Value (line shift)

• What’s value mean, String or number like 54?