The new Raspberry Pi B Model B+ is here - Pick one up in the store and check our detailed guide!

Watch Project

I'm glad I found this site. I've been thinking about making a super simple Mars watch. I looked around to see if anybody else had made one and it turns out a jeweler made a mechanical one for JPL ( http://www.jckonline.com/article/287435-U_S_Jeweler_Creates_Mars_Time_Watch_for_JPL.php )........................
and an engineering student made a digital one ( http://www.popsci.com/diy/article/2012-09/make-your-own-mars-watch-keep-time-mars-rovers )..............................

I had hoped to stay under the pricing and complicated programming/workmanship they had to input (\$50-\$400 price points).
The difference in time between seconds on Mars and Earth is (Earth 1.0274912510416665 second = Mars 1 second) so my idea was to simplify the code and make the watches extremely low cost and easy to reproduce. I thought since you can write a delay based on milliseconds you might be able to write a digit 000,000(plus one) at a delay rate of 1027-1028 until you reach 243,935 at which point the program would return to start at 000,000. and start again adding 1 digit every 1027 milliseconds.

This is the first piece of code I'm messing with (terribly inefficient)

Code: Select all | TOGGLE FULL SIZE
void setup()
{
Serial.begin(9600);

Serial.println(.01);

delay(1027);

Serial.println(.02);

delay(1027);

Serial.println(.03);

delay(1027);

Serial.println(.04);
}

void loop()
{

}

If anyone has any suggestions or nows how I can make the "serial.println" just add one digit every 1.027 that'd be awesome. I basically just want to make the timer go from 00.00.00 to 24.39.35 without having 50,000 KB of code. I know there's got to be a way to have it "plus one" every 1027 milliseconds.

I'm no programmer so there may be a lot I'm missing but this seemed to me to be the simplest cheapest way to make a reasonably accurate watch for everyday use. I would compare these to a cheap watch you might get at Walmart for under \$10, obviously it's not going to be a Roh Lex (banned word apparently) and at times you'll have to reset it if it gets off a few minutes, but I think it's a promising start. I welcome (and ask for) ANY response positive or negative on this. I'm open to suggestions and criticism. Thanks!
daremick

Posts: 25
Joined: Wed Sep 26, 2012 9:17 pm

Re: Watch Project

I strongly suggest that you read the Arduino tutorials. (On top of this page, there is a link to the tutorials.) You will find out about things called "variables". You will also find out that, in Arduino programs, plus and minus signs mean pretty much what you would expect them to mean.
odometer

Posts: 98
Joined: Sun Aug 21, 2011 10:01 pm

Re: Watch Project

Thanks for the helpful suggestions! :)
daremick

Posts: 25
Joined: Wed Sep 26, 2012 9:17 pm