Hi
I am testing this code, serial monitor is working but serial plotter not, any idea where is the problem ?
[code]/**
Measures the voltage on an analog pin over a ~1s period of time
and sends the Min, Max and Diff (Spread) values over Serial.
Author: Dimitar Kovachev, http://lowvoltage.wordpress.com/
Released under the Creative Commons Attribution Share-Alike 3.0 license
http://creativecommons.org/licenses/by-sa/3.0/
*/
const int analogPin = A0;
void setup() {
Serial.begin(115200);
// Serial.begin(9600);
}
void loop() {
int mn = 1024; // mn only decreases
int mx = 0; // mx only increases
// Perform 10000 reads. Update mn and mx for each one.
for (int i = 0; i < 10000; ++i) {
int val = analogRead(analogPin);
mn = min(mn, val);
mx = max(mx, val);
}
// Send min, max and delta over Serial
Serial.print("\t m=");
Serial.print(mn);
Serial.print("\t M=");
Serial.print(mx);
Serial.print("\t D=");
Serial.print(mx - mn);
Serial.println();
}
[/code]