Reset Button Simple Programming

I looked online for the Arduino Uno (http://arduino.cc/en/Main/arduinoBoardUno) and it said "Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board." I'm trying to have the reset button able to be clicked to start the code again - here's what I have so far (I'm confused by what it means for "bring this line LOW"):

boolean status_button = HIGH
If (status_button == LOW)

I am trying to make it so that when a TTL pulse is sent to the arduino, the status_button goes to LOW which will make it ignore all the subsequent TTL pulses. Thanks!

(I'm confused by what it means for "bring this line LOW"):

It means connect it to ground.

boolean status_button = HIGH
If (status_button == LOW)

You just set status_button to HIGH, how will that if statement ever be true?

Ah, so I would have:

boolean status_button = HIGH // indicates reset button hasn't been clicked yet?
int TTLpin = 0 // TTLpin is the 0 RX pin which will receive the TTL pulse from external device
If (status_button == HIGH)
digitalWrite(TTLPin, HIGH)

I'm a little confused where to add what - I want to have the button as "HIGH" until the first TTL is received by "TTLpin" which is the RX pin in the 0 spot. How would I go about the LOW statement then - for that I want the TTLPin to just ignore the TTL pulses coming through (after first TTL pulse)?

singha:
I'm a little confused

I bet I'm more confused then you are...

have the button as "HIGH"

What button? Button's are input devices, so if you want it HIGH, don't press it (or do, depending on how it's wired).

first TTL is received

How does one "receive a TTL"?

How would I go about the LOW statement then

You're missing a verb in this statement

TTL pulses coming through

What do you consider a "TTL pulse"?

Perhaps take a step back and try to better explain what you are trying to accomplish in a broader sense, not how you are trying to accomplish it.

Sorry about that. I want to be able to have the arduino uno receive TTL pulses (a 5V pulse) from a spectrometer. The spectrometer can be set to keep outputting TTL pulses at a certain frequency (can be set) and then the arduino relays the first TTL pulse from the spectrometer to the LED controller, which triggers the LED controller code to run. Hope that makes it a little clearer. Here is the code I am going to use. Also, there will be a reset button to start the code over again so that all the TTLs are ignored after the first one until the button is pressed again.

int inputpin = 0; //defines the RX pin(0)
int outputpin = 1; //defines the TX pin(1)
pinMode(inputpin,INPUT); //sets the inputpin as the input for the TTL pulse
pinMode(outputpin,OUTPUT); //sets the outputpin as the output for the TTL pulse
digitalWrite(outputpin,LOW);
while (digitalRead(inputpin)==0) {} // code only will move on if statement is true
digitalWrite(outputpin,HIGH); //sets the pin to 5v
delay(1); //delay in milliseconds, this is time for output pulse
digitalWrite(outputpin,LOW);
while(true);

What do you think - does it match up with what I was saying?

Arrch, you now made me laugh!

= = =
Singha:

You are talking about the RESET button on the Arduino Uno Board, right?

I've never done it, but i guess i would connect a button to it and use a pull-up resistor (you can read the data sheet to see if there is an internal pull-up on that pin...).
This way the pin will be HIGH when the button isn't pressed.
When you press the button, it would connect to ground, be LOW and so it would reset the board.