Button State

Depends on what you mean by automatically. Remember you are writing the software that makes things happen so if you don't tell the controller to do (or not do) something, it won't happen. To the outside it looks automatic, but in your code you need to spell it out.

Without writing the code, the flow should look something like this:

loop()
button_current_state = digitalRead();
If (button_previous_state = OFF) and (button_current_state = ON)
last_press_time = millis()

if (button_current_state = ON) and (millis()-last_press_time <= 3000)
send your signal
else
turn your signal off, stop sending, or whatever

button_previous_state = button current state // this remembers the current state of the button for the detect transition test

You see that the code will set the time when the button changes state (not pressed to pressed), so you need to remember the last state of the button in a global variable (one outside of the loop() function). When you detect the change of state, remember the time, and the rest is 'automatic' :-).

Hope this helps.