TTL Pulse Selection and Reset Button

Hi,

I’m not very experienced with coding, but basically what I am trying to do is have my arduino uno receive continuous TTL pulses from a spectrometer (through the RX pin). The code will need to have the arduino uno take in the first TTL pulse from the spectrometer and send it through via the TX pin (to an LED controller). Then after the first TTL pulse is received and transmitted by the arduino uno, then I’d want the code to ignore all the other TTL pulses after that. Also, I want to have a reset button to click which would start the code over again. I started the code like this:

Boolean status_button = HIGH
If (status_button == LOW, ignore TTL after)

Sorry about the syntax - as I said, I am new to coding. This shouldn’t be too difficult a code to write, but I’m still learning. Thanks for the help in advance.

The Arduino already has a reset button, so that's taken care of.

Feeding the input to an interrupt pin (2 or 3) and using attachInterrupt() to define a handler would be relatively simple.

The interrupt handler could call detachInterrupt() so that future input is ignored.

The loop() function would do nothing.

Sending something via the TX pin involves a call to Serial.begin() and Serial.print() or Serial.write(). What, exactly, you want to send, or why it needs to be via the TX pin isn't clear.

I decided not to use the TX and RX pin. Take a look at my new post in programming, I have a question about the code I wrote - not doing what I'd hoped.

Which post? (And why not post here in the thread you've already started)

Oh, that probably would've been easier. My fault. And it's TTL Pulse Selection Program Problem (name of new post).