Show Posts
Pages: [1]
1  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: February 04, 2013, 09:26:06 pm
with two seperate LED 7-seg displays, i want it hooked up to one push button.

first push turns on a counter and a stop watch

for each push after it will count in 2's (0,2,4,6,8,10...) and stop watch continues

double push will count the last push and stop the timer.

can anyone help, please?
2  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 24, 2013, 02:23:07 pm
DS1307 kit that adafruit sells

Looked at this on thier website and they provide the code for it. How can I hook this up to the LED display?
3  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 08, 2013, 08:03:05 am
thanks crossroads, i realy appreciate it. i will take a closer look at it tonight. don't i need a code to program it?
4  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 07, 2013, 01:19:22 pm
How are you connected up? I use SPI exclusively to MAX7219. What do you have?

crossroads, this is embarassing to admit, but i have no idea what i have. all i know is that i bought the arduino starter kit.
5  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 07, 2013, 12:17:39 pm
I programmed the top left & top right to allow score from 00 to 99.

Do you still have that code? and are willing to share? If not, would the code I found above do the trick?
6  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 07, 2013, 10:19:07 am
found this. credit to missionduke. will this do what i am looking for as far as the counting part?

#include <SoftwareSerial.h>  //for software serial communication



#define txPin 14  //change to your serial port on Arduino board
#define rxPin 15  //not used but is required

SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);
int buttonPressCount;


const int  buttonPin = 2;    //the pin that the pushbutton is attached to




int buttonPushCounter = 0;   //counter for the number of button presses
int buttonState = 0;         //current state of the button
int lastButtonState = 0;     //previous state of the button


void setup()  {
  pinMode(buttonPin, INPUT);  //initialize the button pin as a input
  Serial.begin(9600);  //initialize serial communication

 pinMode(txPin, OUTPUT);
 //the following resets the board, changes the brightness to 100%, and sets the board to '0000':
 mySerial.begin(9600);
 mySerial.print(0x7A,BYTE); //special character
 mySerial.print(0x00,BYTE); //set brightness to full
 mySerial.print(0x76,BYTE); //reset board
 mySerial.print(0); //send '0' character
 mySerial.print(0); //send '0' character
 mySerial.print(0); //send '0' character
 mySerial.print(0); //send '0' character
}

void loop(){
 
  buttonState = digitalRead(buttonPin);  //read the pushbutton input pin

  // compare the buttonState to its previous state
  if (buttonState != lastButtonState) {
    // if the state has changed, increment the counter
    if (buttonState == HIGH) {
      // if the current state is HIGH then the button
      // went from off to on:
      buttonPushCounter++;
     
      Serial.print("number of button pushes:  ");
      Serial.println(buttonPushCounter, DEC);
      updateDisplay(buttonPushCounter);  //function to update the display 'requires button press count'
     
     
    }

  }
 
  lastButtonState = buttonState;  // save the current state as the last state, for next time through the loop

 

}




void updateDisplay(int buttonPushCounter){
String intString = String(buttonPushCounter);  //changes integer to a string
char displayChars[4];  //create array to hold the four numbers
int stringLength = intString.length();  //get length of the string
//the following will determine if the button press count variable has 1, 2, 3, or 4 numbers in it
//and will fill the empty spaces with '0'. so if the button press count variable is '29' it will end up being '0029':
if(stringLength == 4){
  displayChars[0] = intString.charAt(0);
  displayChars[1] = intString.charAt(1);
  displayChars[2] = intString.charAt(2);
  displayChars[3] = intString.charAt(3);
}else if(stringLength == 3){
  displayChars[0] = 0;
  displayChars[1] = intString.charAt(0);
  displayChars[2] = intString.charAt(1);
  displayChars[3] = intString.charAt(2);
}else if(stringLength == 2){
  displayChars[0] = 0;
  displayChars[1] = 0;
  displayChars[2] = intString.charAt(0);
  displayChars[3] = intString.charAt(1);
}else if(stringLength == 1){
  displayChars[0] = 0;
  displayChars[1] = 0;
  displayChars[2] = 0;
  displayChars[3] = intString.charAt(0);
}
 mySerial.print(0x76,BYTE); //Reset board
 mySerial.print(0x76,BYTE); //Reset board
 mySerial.print(displayChars[0]); //Send '0' character
 mySerial.print(displayChars[1]); //Send '0' character
 mySerial.print(displayChars[2]); //Send '0' character
 mySerial.print(displayChars[3]); //Send '0' character

delay(100); //this will make it so you don't get double counts. you could also use this to avoid someone pressing the button repeatedly 'for fun!'
 
}

7  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 03, 2013, 01:37:30 pm
Easily.
You can do it with SPI.transfer() commands to set up the MAX7219 and send it the 6 digits you want to display, or use some library to do it.
This is a much larger version that uses a Promini for control and a MAX7221 (MAX7219 is identical but with faster signal edges) driving countdown timer display (and countup is easier) in the middle and 2 set of 00-99 digits at the upper sides.
The '328P based promini does the timing, no external clock needed.

I think your hardest part will be making it all watertight.
Can make it rechargeable-battery powered with sealed connectors for the pushbutton for the lap counter and the external reset.
Or go fancier and make the reset wireless, so the only connection is for the lap button.



CrossRoads, you really do understand what I am trying to design! I thought I was explaining it wrongly. In the image you attached, I see the two couting LEDS on the left and right as well as the bottom set couting real time. What at the 2 digit 7 segment LEDS under the large left do?

Is this image something you have made or something you found online?
8  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 03, 2013, 12:17:08 pm
If you have the MAX7219 driving the displays, and you wanted larger 2-3" digits, then seperate common cathode displays is the way to go.
You said you wanted time to hundreths, so MM:SS.TH + 99 would be one way to occupy 8 digits.


Does the Arduino come with MAX7219?

I have decided that I would have two sets of displays:
1. 4-Digit 7-Segment LED Display for the real time
2. 2-Digit 7-Segment LED Display for the counting (0-99)

2 buttons:
1. Couting button for the 2-Digit 7-Segment LED Display
2. Reset Button (not from the Arduino)

Is this possible?
9  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 02, 2013, 06:02:51 pm
that is okay i rather have the counter to be displayed larger than the real time, thanks for all your help.

now if i could get some help coding that would be great.
10  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 02, 2013, 05:00:38 pm
After looking at the website you both provided perhaps a Double Digit Seven-Segment LED Display for the laps 0-99.

And a Four Digit Seven-Segment LED Display for the real time module.

Wouldn't it be simplier if the two counts were on seperate LED displays?
11  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 02, 2013, 02:02:54 pm
I am looking for them to be a bit larger than 1 inch, rather 2-3 inch.

It is okay if they RTC is not 100% accurate, your inital suggestion will be just fine, thanks!
12  Community / Gigs and Collaborations / Re: Looking for help regarding a Counter on: January 02, 2013, 01:30:47 pm
I am definitely looking for someone to help me write the code for me, Arrch.

I don't have anything yet, except what I want my program to successfully do. After thought a 3 segment LED display will be enough for my counting since I only want it to go to the hundreths place 0-999.

I do not have a RTC module yet. Any suggestions?
13  Community / Gigs and Collaborations / Looking for help regarding a Counter on: January 02, 2013, 11:40:07 am
Hi All,

I am new to Ardino and am looking to use Arduino in my next project for my students.

Final Product: I want to create a waterproof lap counter that one can use in the pool when swimming laps. I would design the product to count laps and keep track of real time.

Programming Counter (LED Display I):
- LED display readout to increase in count everytime a button is pushed up to the hundreths place
- reset button so that one can use this device over and over again

Time (LED Display II):
- Real time

if anyone could help me with this programming I would greatly appreciate it. I would truly like to create these programs for my students but am unclear how to begin.  Thank you.
14  Using Arduino / Project Guidance / Programing a Counter on: November 11, 2012, 09:35:32 pm
Hi All,

I am new to Arduino and would like to program a counter for the gym. If someone could please help me create this I would truly appreciate it.

I am looking to create a program to correspond to 3 separate LED readouts on one device.

The first digital display would display a counter that at the push of a button it will count and will continue counting every time I push it.

The second digital display would display the overall time of when I start my workout and end.

The last digital display would display real time.

Please respond, I have no idea how to use Ardunio and would love to make this device as soon as I can given the correct program. Thanks in advance.
Pages: [1]