# Separating FSR Values and Labelling Graph

Hello, I am a high school student working on a major design project. It is a starting block that will detect the force put into different parts of the footpads. However I have very little programming knowledge and need help with making code that will differentiate between each (A) pin that is used. Such as, Heel Force (R)... Forefoot Force (L). Below is my current arduino setup and the code. I am wishing to display these in the Serial Monitor and Plotter Thank you

This is my Code

``````const byte PinFsr [] = { A0, A1, A2, A3};
const unsigned Nfsr = sizeof(PinFsr);

char        s [80];
const char *t;

// -----------------------------------------------------------------------------
void loop ()
{
for (unsigned n = 0; n < Nfsr; n++)  {
int fsr = analogRead (PinFsr [n]);

if (fsr < 10)
t = "No pressure";
else if (fsr < 200)
t = "Light touch";
else if (fsr < 500)
t = "Light squeeze";
else if (fsr < 800)
t = "Medium squeeze";
else
t = "Big squeeze";

sprintf (s, " %6d %-18s", fsr, t);
Serial.print (s);
}

Serial.println ();
delay (100);
}

// -----------------------------------------------------------------------------
void setup ()
{
Serial.begin (9600);
}

``````

Graph with no pins attached.

The Arduino serial plotter can’t handle those text interpretations.

If you want labels it can understand lines like:

‘’’
Label1=123 label2=1010 label3=-777.7
Label1=133 label2=910 label3=-777.7
Label1=123 label2=810 label3=-777.7
‘’’

And if you need to show thresholds on the graph add them as another column with a constant value.

What if i were to display the values onto an lcd screen, what would the code look like if this approach was taken. Each value would need a seperate value like L=20 for pin A1 and R=25 for pin A2