console output?

Hi. Very new here.
Would like to know how I can output messages to the console.
Also what is the sizeof(int)?
I am trying to use delay to wait for x amount of time (in milliseconds) and if its greater than 65535 then going to wrap around?

The serial library is what you want, it can send data to the IDE serial monitor.

Int is 16 bits. and 65K is the range for an unsigned int, not a ( signed ) int.

To answer your first 2 questions

unsigned int example = 65535;

void setup() 
{
  Serial.begin(9600);
  Serial.print("The example unsigned int is : ");
  Serial.println(example);
  Serial.print("Size of unsigned int = ");
  Serial.println(sizeof(example));
}

void loop() 
{
}

To see the output turn on the serial monitor in the IDE (top/right) after compiling and uploading the code.

delay is defined as

“Syntax delay(ms)
Parameters ms: the number of milliseconds to pause (unsigned long)”
So 65535 is not going to bother it at all.
How long are you going to delay and why ? There is almost certainly a better way of doing it.

Thanks for the Serial tip!

I wish I had a simulator... Cause my board is now busy taking pictures... Yes I think there are better ways, but I only have on task that that is to fire the timer every 90 seconds.

I think I'm going to do a lot with these little devices... So I think learning a bit about multi-tasking and interrupt service routines (yet again).....

Gotta get a touch screen interface... :)

HDMI might have been another option for controlling my camera...

BrianOBrien: my board is now busy taking pictures...

It could also be doing other things whilst it waits. Such a waste.

Yep, read the blink without delay example code in Arduino. A touch screen will need a lot of resources so the simpler the better.

So I think learning a bit about multi-tasking and interrupt service routines (yet again).....

Perhaps even threading. Yep. the no-operating system Arduino is perfect for multi-tasking and threading. It's got memory and processor speed to spare. Doesn't it?

Enough memory and CPU to learn important basics about multi-tasking and ISR()'s an other OS details imho ;)

UKHeliBob:

BrianOBrien: my board is now busy taking pictures...

It could also be doing other things whilst it waits. Such a waste.

Well I can't program it and have it next to me while it's busy doing what I programmed it to do...

Buy a second one. Come on. you know you want to !

Actually, I was referring to the waste of having it sitting around for 90 seconds at a time not able to do anything else (even if were right next to you), then just clicking a shutter, which is what I imagine it is doing.

Stoopid question but what else could the controller be doing? besides waiting, it’s a shutter timer, isn’t it?..

Bob

Logging changing light levels, detecting movement, tracking the movement, monitoring battery charge, calculating the value of Pi, sending information back to base via WiFi, tweet or web page update, acting as a burglar alarm, etc etc. Basically anything that an Arduino could be doing in that location regardless of whether it is related to the camera.