In: Computer Science
Arduino IDE serial plotter
How the Arduino Serial Plotter Works. The Arduino Serial Plotter is a Tool that comes pre-installed with your Arduino IDE (version 1.6. 6 and above) that takes incoming serial data and displays them in a plot. The vertical Y axis adjusts as the value of your serial data increases or decreases.
We have given the input as u(t)
Delay time as 0.4
Output as o(t)=u(t-h)
int sensorPin = u(t); // select the input pin for the
potentiometer
int ledPin = o(t)=u(t-h); // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the
sensor
void setup() {
// declare the ledPin as an OUTPUT:
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
Serial.print(" ");
delay(0.4);
}
We need to connect this code to the particular motherboard along with the arduino to see the particular result.