i am a beginner I would appreciate it if someone help me to write a programme to receive data(62 data) from arduino to processing and class them in a table plz
Hello,
What is your your progress so far?
What kind of data?
Get to know the resources available to you.
Resources < Click here to expand !
I encourage you to review the resources available here:
- The Processing website has references, examples, tutorials, etc.
https://processing.org/ - Those available with the Processing PDE (IDE).
An exploration of the tabs will reveal what is available; there are libraries and examples there. - The Coding Train
https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw
https://thecodingtrain.com/ - Happy Coding
Processing Tutorials - Happy Coding - The Processing Foundation
https://processingfoundation.org/
Check out the tabs.
In the education tab, there is a reference to the Coding Train.
Related:
https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing/all
:)
I am looking for a way to recieve sensor data from arduino to processing and class those data in table in the same order that I recieved them so I can draw graphes with them and display them
@glv I already got the recieving part I juste need to class my data in a table in processing
this is my sending from arduino programme
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.print(analogRead(A0));
Serial.print("\n");
Serial.print(analogRead(A1));
Serial.print("\n");
Serial.print(analogRead(A2));
Serial.print("\n");
delay(500);
}
Hello,
What have you done so far?
:)
Hi, Thanks for the suggestion,
I did an application where I recieved my data from the arduino and decplayed them in graph
now I just need put the data that I recieved in tabular in processing
this is what I did
//Variables to draw a continuous line.
int lastxPos=1;
int lastheight=0;
void setup () {
// set the window size:
size(600, 400);
myPort = new Serial(this, "COM5", 9600);
// A serialEvent() is generated when a newline character is received :
myPort.bufferUntil('\n');
background(0); // set inital background:
}
void draw () {
if (newData) {
//Drawing a line from Last inByte to the new one.
stroke(127,34,255); //stroke color
strokeWeight(4); //stroke wider
line(lastxPos, lastheight, xPos, height - inByte);
lastxPos= xPos;
lastheight= int(height-inByte);
// at the edge of the window, go back to the beginning:
if (xPos >= width) {
xPos = 0;
lastxPos= 0;
background(0); //Clear the screen.
}
else {
// increment the horizontal position:
xPos++;
}
newData =false;
}
}
void serialEvent (Serial myPort) {
// get the ASCII string:
String inString = myPort.readStringUntil('\n');
if (inString != null) {
inString = trim(inString); // trim off whitespaces.
inByte = float(inString); // convert to a number.
inByte = map(inByte, 0, 1023, 0, height); //map to the screen height.
newData = true;
}
}