Help for Arduino + Processing

Hello, I am currently project and I need a boost.
I have the following arduino program that can read the values ??of a potentiometer that I converted to displacement (example : for the 1V is so much of a millimeter) as well as an accelerometer values ??on the Y axis only (this is the one that interests me).
My goal is to represent the values ??of these two sensors on a graph with Processing. On the monitor serial I have good value I would like to graphically so I tried to make a program in processing but it does not function, and I’m not too comfortable with processing. All programs will endnotes. Would you another software related with Arduino allowing me to represent these values ??in graphical form? (My connection between Arduino and Bluetooth is through the serial port COM6).

Arduino program :

#include <Wire.h>
#include “MMA8452.h”
const int poten = 0; // le potentiomètre, branché sur la broche analogique 0
int valeurLue; //variable pour stocker la valeur lue après conversion
float P; //on convertit cette valeur en une tension
float A=0;
void setup()
{
Serial.begin(9600);
Serial.println(“Exemplo de uso do acelerometro MMA8452”);
Wire.begin(); // Initialise I ² C communication
initMMA8452(); // Tests et initialise le MMA8452
}

void loop()
{
int acelCont[3]; // Variable qui stocke les valeurs des lectures de 12 bits
readAccelData(acelCont); // Lecture de tous les axes du capteur (Seulement Y nous interesse)
float acelG[3]; // Variable pour stocker les valeurs de l’accélération en g (9,8 m / s ²)

// Calculer l’accélération et sépare la acelG de matrice
for (int i = 0 ; i < 3 ; i++)
{
acelG = (float) acelCont / ((1<<12)/(2GSCALE)); _
_
A=acelG[1];*

}
* {*
* //on convertit en nombre binaire la tension lue en sortie du potentiomètre*
* valeurLue = analogRead(poten);*
* //on traduit la valeur brute en tension (produit en croix)*
_ P = (valeurLue * 5.0 / 1024)*12; _

* //on affiche la tension calculée*
* Serial.print("deplacement = ");*
* Serial.print(P,2);*
* //On l’envoie à Processing*
* Serial.print(“mm”);*
* Serial.println();*

* Serial.println(); //on saute une ligne entre deux affichages*
* delay(100); //délais d’attente pour l’affichage*
* }*
* // Imprimi os valores na Serial*
* for (int i = 1 ; i < 2 ; i++)*
* {*
* //On l’envoie à Processing*
* Serial.print(“accelerometre”);*
* Serial.print("=");*
* Serial.print(A,4);*
* Serial.println();*
* }*
* Serial.println();*
* Serial.println();*
* Serial.print("--------------------------------------------------");*
* Serial.println();*
* // Saut à la ligne*
* delay(100); // Delais pour la visibilité des valeurs.*
}
ScreenShot of my Serial monitor Arduino :

Processing Program :
import processing.serial.*;

static final int WIDTH = 1000;
static final int HEIGHT = 800;
Serial myPort;
int[] Acc = new int[WIDTH];
int[] Pot = new int[WIDTH];
float P;
float A;
void setup() {

* size(WIDTH, HEIGHT);*

* noSmooth();*

* P= 0;*
* A=0;*

* println(Serial.list()[1]); //list of available serial ports*
* String portName = Serial.list()[1]; //replace 0 with whatever port you want to use.*
* myPort = new Serial(this, portName, 57600);*
* myPort.bufferUntil(’\n’);*
}
void draw() {

* // shift all data by one position*
* for (int i=0; i<WIDTH-1; i++) {*
_ Acc = Acc[i+1];
Pot = Pot[i+1];_

* Acc[WIDTH-1] = int(A);*
* Pot[WIDTH-1] = int(P);*
* }*

* // clear screen*
* background(0);*

* // draw graphs*
* for (int i=0; i<WIDTH-1; i++) {*
* stroke(0, 255, 0);*
_ line(i, Acc*, i+1, Acc[i+1]);
line(i, Pot, i+1, Pot[1+i]);
}
}
void serialEvent(Serial myPort) {
String line = myPort.readStringUntil(’\n’);*_

* if (line!=null) { *
* // split incoming line into tokens *
* String[] q = splitTokens(line); *
* if (q.length == 3) { *
_ A = HEIGHT/2 - HEIGHT/2 * float(q[1]);
P = HEIGHT/2 - HEIGHT/2 * float(q[1]);_

* } *
* }*
}

Please read the how to use the forum sticky post. Especially the bit about how to post code. Did you notice how your code turned into italics part way down? This means the forum software has mangled your code and corrupted it, this does not happen when you post it correctly.