Arduino Camera -TTL Interface Linksprite Camera

Hello, I would like some guidance on a project I was recently assigned at school, I only understand some code. I was not sure if to post on here or on the coding section, if I should of posted someplace else please let me know.

Set up a camera to take a picture and save it onto an SD card (will post pictures of set up soon) every 2 hours or so with an LED light cycle which extends over 2 hour periods (sunrise/sunset). Also, have a motor turn on/off every once in awhile.

I can get the Arduino to do the light cycle but not smoothly, also I can get it to take pictures with the camera through the TTL interface but I need the Arduino to be portable therefore the serial connection does not work, unless i am not getting something. Any help or guidance would be much appreciated.

For the LED cycle see the BlinkWithoutDelay example.

I don't understand your Serial problem. The Arduino continues executing your sketch, even if detached from the IDE and USB port. You only need a power supply to power the Arduino with USB detached.

yes i used that example but when stretched over a long period of time,the LED's take increments in light level, could I use varying resistors to decrease the light increment to make it seem more smoothly?

Oh really? I didn't know that, from when I read about it on the Arduino learning section I understood it incorrectly, thank you so much for your help, I'll update this post today when I get home and try it out. Again much appreciated for your quick response.

I think that you want to also set up a (possibly invisible) clock in units of

float day;
byte h,m,s;

where you have something regular counting up the seconds and possibly

day = h/24.0+int(m)/1440.0+long(s)/86400.0;

I do not think that changing some resistors would sufficiently improve your detection of sunset time on a clear day when light falls, as the light might go less than that during a lunchtime winter storm. So a possible solution is to have a loop getting the average light of the last few thousand points to do light dependent things but to rely on the clock for time dependent things such as the correct heading for a solar collector on a motor turntable.

Since you say that you are quite new to programming, I suggest that you read a little about number types byte, int, long, float, as it does need to know which type, and averaging requires that you know which is which.

Hmm... A clock idea would be helpful to have it all increment together since I need the camera to take pictures when the LED's reach full brightness, which was why i was wondering with the resistors to make the light increment smaller, because through using the PWM function over a short period of time, makes the PWM system great, but I am trying to make it go for 2 hours. I saw this on a forum a while back and wondered if it could be done effectively, I am not trying to make a detect sunlight or sunset time, sorry for not explaining, this will all be inside of a dark box and the light will come on every 2 hour increments therefore adding light for the camera and giving the algae light to grow in. Also, there is a motor that agitates the Algae once in a while but I got that figured out.

I understand number types and functions and other things in coding, I'm just not familiar with the more advanced stuff, therefore I consider myself new at coding. Thank you again so much for your help.