I wanted to use just a button connected to arduino, but I want him to give me data just after 4 seconds, and another data if I just push the button for 1 second, so if I push the button for five seconds I will have pin 12 on and if I push the button for 1 second I will have pin 11 on.
Yes it can be done, but you need to look into simple timing codes. You press/hold the button, it stores the current millis(), (time) into a variable. Then using an IF statement, you look at the current time and subtract the stored time, all while comparing the difference to a Set time (5 seconds)
if(millis() - My_Time > 5000)
{
//done after 5 seconds have passed
}
else
{
// do something else or add more times to look at. EX 1 second, 2 seconds ... N seconds
}