Pages: 1 ... 10 11 [12]   Go Down
Author Topic: Stopwatch with Pause/Lap  6 digit 7 seg LED. HELP!  (Read 121638 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
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

You're very welcome Warren.

Why go down? Just hit reset and start readout from 0 again.

Well, if you must go down, replace the top of the memory_read code:

Lap#      address1      address2      address3      address4      address5      address6
1      0      1      2      3      4      5
2      6      7      8      9      10      11
3      12      13      14      15      16      17
:      :      :      :      :      :      :
83      492      493      494      495      496      497
84      498      499      500      501      502      503
85      504      505      506      507      508      509
86      510      511      512      513      514      515
// adjust reset # in EEPROM_writing to be 516, from 512

Code:
//Memory
//Memory Up Button Here

memory_up_button_state = digitalRead (memory_up_button);

if ((memory_up_button_state == 0 && running == 0)|| EEPROM_reading_up == 1){ // not running - button pushed, or already reading
  if (EEPROM_reading_up == 0){
    EEPROM_reading_up = 1; // enable reading
    //Serial.println ("EEPROM reading up enabled ");
    delay (300); // or set up something with millis() to keep from double reads
  }
}
//Memory Down Button Here (new code)

if ((memory_down_button_state == 0 && running == 0)|| EEPROM_reading_down== 1){ // not running - button pushed, or already reading
  if (EEPROM_reading_down == 0){
    EEPROM_reading_down = 1; // enable reading
    //Serial.println ("EEPROM reading down enabled ");
    delay (300); // or set up something with millis() to keep from double reads

    if (EEPROM_address == 6){
EEPROM_address = 510:
    }
    else{
      EEPROM_address = EEPROM_address -12;
    }

  }
}


if (EEPROM_reading_up == 1 || EEPROM_reading_down == 1){
  switch (byte_to_read){

continue with exisitng EEPROM reading code

If you want to write ( 255? ) to clear the memory with double button press &  hold, then will have to come up with something like the pause button with case statements, add in code to read the EEPROM to know when to stop writing, etc.
I was just thinking it would be neat to have the memory up or down button require 2 presses - 1st would display lap number (calculated from the start address being read), 2nd would display the time.
« Last Edit: January 23, 2011, 06:44:29 pm by CrossRoads » 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: 549
Posts: 27425
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

You have to update EEPROM_reading to
EEPROM_reading_up & EEPROM_reading_down in presetup & in the stop/reset area as well, assign new pin #, etc.
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: 549
Posts: 27425
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

Test reply.
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
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26631
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's not supposed to happen!
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


To make the situation truly annoying, a few days ago I removed some spam from the "read only" area.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26631
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley-grin
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
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

Wow - how'd this thread get pulled oved from the old forum?
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
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Let's continue here...
http://arduino.cc/forum/index.php/topic,77658.msg586626.html#msg586626
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26631
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good idea - it's a bit spooky in here.   smiley-lol
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

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