Go Down

Topic: CLS command (Read 518 times) previous topic - next topic

Prais01

I am trying to read in from the analog input.
My idea is to display the input, wait a moment, clear the screen and repeat.
The CLS and Clear commands are not working,
I have been looking but haven't found anything to make this work.


#include <stdlib.h> 

void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(1);        // delay in between reads for stability
  Serial.println(clear);


}

}

MarkT

You have not given the information needed to solve the problem - what screen are you trying to clear?  Where is all your code?  Have you read the sticky thread "Read this before posting a programming question..." ?
[ I won't respond to messages, use the forum please ]

James C4S

stdlib does not do anything with the Serial Monitor...

There isn't a way to clear the Serial Monitor built into the Arduino IDE...
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy