I would need help for pease of code

Hi, I'm kinda new. Just started to learn programming today.

But I have a problem. I don't know how to do code that would do this:

If digitalRead (3, low) for more than (6seconds) than digitalWrite (2,HIGH)

Can anyone help me with this ?
Thank for any reply :slight_smile:

The beginner's guide to millis() may be a place to start.

Ok, thanks I'll move there :slight_smile:

If you still have trouble, post the code that you tried, explain what the code actually does and how that differs from what you want.

I somehow fixed it so now the code works great. But the fact that transistor just exploded isn't very convincing lol