Pages: 1 ... 9 10 [11] 12   Go Down
Author Topic: Stopwatch with Pause/Lap  6 digit 7 seg LED. HELP!  (Read 119753 times)
0 Members and 1 Guest are viewing this topic.
Opava,Czech Republic
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oups, I see, that I am so slowly.  ;D
I will try new code from you Robert
Logged

Northern Ireland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
Arduino Novice!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The snow you get is crazy!! This country comes to a halt with 2 inches.. haha. Best of luck with it Robert and keep safe!  smiley

The digits are [size=16]BIG[/size].. but I'd rather they were big than maybe not big enough!? The thing is, they need to be read at fast speeds so I am hoping the size is perfect.

Quote
Warren - the Led's are amazings. Where are you buy it?
Hi David, I got them from http://proto-pic.co.uk/products/7%252dSegment-Red-6.5%22-Display.html in the UK.
They originally come from Sparkfun here: http://www.sparkfun.com/products/8530
For what you get, they are very cheap and surprisingly good quality, I was really pleased.  smiley

Robert, I tried your download link again but got a blank page again.
I was just wondering if you still had the old sketch from when it paused perfectly.. so you could compare as to why it's now not working. If you need it I keep copies of all the stages we have been going through.
Warren
Logged

Northern Ireland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
Arduino Novice!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just realised that the code is also in this forum :smiley..
Logged

Opava,Czech Republic
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Warren, files are on places, where Robert wrote. You have to change text to rows by Enter keys after each semicolon, braces etc... Here are only fragments of all code!
So look at this:
http://www.crossroadsfencing.com/stopwatch_22Jan/stopwatch_22Jan.pde
http://www.crossroadsfencing.com/stopwatch_22Jan/a_presetup.pde
http://www.crossroadsfencing.com/stopwatch_22Jan/b_setup.pde
http://www.crossroadsfencing.com/stopwatch_22Jan/c_void_loop.pde
http://www.crossroadsfencing.com/stopwatch_22Jan/d_start_pause_unpause.pde
http://www.crossroadsfencing.com/stopwatch_22Jan/e_memory_write.pde
http://www.crossroadsfencing.com/stopwatch_22Jan/f_memory_read.pde
http://www.crossroadsfencing.com/stopwatch_22Jan/g_stop_reset.pde
http://www.crossroadsfencing.com/stopwatch_22Jan/h_display_update.pde
« Last Edit: January 23, 2011, 09:46:32 am by David_Rudla » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27144
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Warren,
I put it up now as
http://www.crossroadsfencing.com/stopwatch_22Jan.zip
You should be able to download, unzip, and have a complete set of files now.

David,
I think the new skeleton agress with I ended up with. I just didn't write it as functions.
The main thing we started with was accurate 0.01 second intervals, the button pushes were incidental to that.
If you take the stuff in tabs and copy them all end to end, it looks like what you have.

I found as the programs get bigger, it just gets harder & harder to keep track of what is going on with all the scrolling up & down.

I wonder if the new forum, which we get moved to tomorrow, will allow for bigger code listings?
Seems to me thats its the comments which drive up the message size (limit of 9500 characters), yet without them code is pretty difficult to follow.

Robert
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27144
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Warren,
I don't think display speed will be a problem.  Electricity moves fast! And you are only switching 20mA. If you read the datasheet, time is not mentioned anywhere. The 100's will be a blur, you may be able to make out the tenth' as they change at 10 times a second.

What have you ended up with for a power source?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Northern Ireland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
Arduino Novice!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't think display speed will be a problem.  Electricity moves fast! And you are only switching 20mA. If you read the datasheet, time is not mentioned anywhere. The 100's will be a blur, you may be able to make out the tenth' as they change at 10 times a second.
Display speed wont be a problem.. when I said "they need to be read at fast speeds" I was referring to the digit size as they will be in pause mode when being read by the rider/driver.

Quote
What have you ended up with for a power source?
I haven't sourced one yet.. I am going to use a power drill battery like you suggested before until I can find a good one. I want something slim so I can place it in the middle of the unit and try to keep everything balanced.  smiley
I am going to download your zip now and report back shortly.  smiley
Logged

Northern Ireland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
Arduino Novice!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That link isn't working..?? Taking me to "Page Not Found"??? :-/
Logged

Opava,Czech Republic
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Warren, please use right mouse button and click on Save target as... The file is all right.

Robert, thank you for your support. Idea is clear at this time. I am ready go up with accuracy - I need 0,001 in my aplication.


Repair: after downloading windows spoke to me that archive is either in unknow format or damage, I use for it WinRar, which have not problem with Zip. Robert which program you are used for it? All package has 1 252 bytes.
« Last Edit: January 23, 2011, 01:33:53 pm by David_Rudla » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27144
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

David,
http://www.crossroadsfencing.com/stopwatch_22Jan/stopwatch_22Jan.zip

With windows vista, going to this link prompts me to open/save the file. What happens for you?

David,
Should be doable - I use 100uS for my time check intervals:

unsigned long currentMicros = 0;  // start of loop interval timer
unsigned long previousMicros = 0; // end of interval?
unsigned long hundred_uS_interval = 100; // = 0.1mS, use 1000 for 1mS
:
:
  // ********************************************************************************
  // start timing interval
  // ********************************************************************************

  currentMicros = micros();  // sample the time
  if (currentMicros - previousMicros >= hundred_uS_interval) // more than our interval?
  {
    // save the last time we okayed time updates
    previousMicros = currentMicros; // save the current time for next comparison
    toggle = 1-toggle;  // -> 1-1, 1-0, 1-1, 1-0, results in 0 1 0 1 ...

    // do stuff on 0.1mS intervals, 1mS intervals, ets.

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27144
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I zipped it with this http://www.7-zip.org/

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Northern Ireland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
Arduino Novice!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Robert, I got it with this link;
http://www.crossroadsfencing.com/stopwatch_22Jan/stopwatch_22Jan.zip
but not this one;
http://www.crossroadsfencing.com/stopwatch_22Jan.zip

Quote
Repair: after downloading windows spoke to me that archive is either in unknow format or damage
I have downloaded and extracted the files fine this time using the new link address from Robert.

I will run it now and let you know how it works.
Warren
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27144
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, need the whole path :-)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Opava,Czech Republic
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you Robert. I is running. So I will a little bit change code - output to LCD display and outputs to 485 net. I suppose, that I will not have problem. I suppose, that I will have also next parts for improovements - RTC, temperature.... So thanks again.
Logged

Northern Ireland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
Arduino Novice!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Robert... have I ever told you..
[glow][size=20]Your A STAR!!![/size][/glow] [smiley=dankk2.gif]
That is working fantastically!!!! brilliant!
As you can imagine, I am over the moon!

The recall of the memory is working great. I will now have to add another button for 'memory_down' and then write something that will clear the memory when both buttons are pressed together.
Logged

Pages: 1 ... 9 10 [11] 12   Go Up
Jump to: