Introduction
Many times, when we use sensors connected to our Arduino-based PLCs, we have the need to graphically see the power values received or sent, to monitor and test the correct operation of the application.
We are going to see how to use the Arduino Serial Plotter to be able to display multiple values graphically.
Latest Posts
Requirements
Testing Arduino Serial Plotter
Arduino Serial Plotter is one of the fantastic tools of the Arduino IDE through which variables can be graphically monitored in a very simple way.
The Arduino Serial Plotter is really useful for monitoring input values because you can see what you are receiving. The same happens with output variables since you can see graphically the digital or analog value that is sent through the outputs.
Let's see how to program our PLC to monitor these variables:
1. Open Arduino IDE.
2. We will write a basic code with random values in two variables, to be able to see something through the serial plotter, without there being errors in the reading of sensors or values in the inputs or outputs of the PLC.
So copy and paste this code into your Arduino IDE:
void setup() {
Serial.begin(9600);
}
void loop() {
int value1, value2;
value1 = random(1000,6000);
Serial.print(value1);
Serial.print(",");
value2 = random(0,3000);
Serial.println(value2);
delay(100);
}

- Learn how to do an analog read with Arduino-based PLCs Check it out >>
- How to do a digital read Check it out >>
How to work with Arduino Serial Plotter with multiple values