Programming Question

Hi community,

I was wondering if you can print a value of a variable in the console of the Arduino IDE?

Like in Java: System.out.println(myVar);

Thanks,

They're called Serial functions.

You call

Serial.begin(/*baud, generally 9600*/ 9600);

once (ie in setup)
and then

Serial.print(/*Number or string*/ "hithere");

to actually print.

To view the messages, you click the "serial monitor" button in the IDE, and make sure the bauds are the same.

I was wondering if you can print a value of a variable in the console of the Arduino IDE?

No, but the rightmost icon opens the Serial Monitor, where Serial.print() and Serial.println() statements output data.

Thanks!