serial interface

sorry for the total newb question, when I hook up my uno and write the code for a simple LDR circuit

int sensePin =0;

void setup(){


void loop (){
delay (500);


should I be getting output in my serial monitor after uploading this code

If the serial monitor is open and the serial speed matches, I don’t see why not

Please remember to use code tags.

thanks for the reply AWOL

serial speed matches?? where do I check this?? 9600 is standard for PC an Arduino correct??

You check it at the bottom of Serial Monitor where you select the speed.

It’s a good idea to put a Serial.println() line in setup() to let you know that communication is working

For example

void setup(){
  Serial.println("Arduino program NNN has started");

where NNN is the name of your program.


And you can even get the sketch to report its own name

void setup ()
  Serial.begin (115200);
  Serial.println (F(__FILE__ " starting")); 

And you can even get the sketch to report its own name

Neat. I must remember that.