Input

How do i make a code that triggers something when it gets a input on the gpio pins?

Hope you can help.

Johan.

Look at the example codes. There are plenty of examples of that. Read through the reference on this site and learn what the different commands do. You really haven't given any details so there's not much more that can be said.

johansch1:
How do i make a code that triggers something when it gets a input on the gpio pins?

Hope you can help.

Johan.

Sounds like you want to read a digital input. In which case the digitalRead() function would seem to be a likely candidate, don't you think ?

Then you want to take action if (hint) an input is detected.

As suggested, look at the examples and the reference pages.

Then you want to take action if (hint) an input is detected.

The digitalRead() function ALWAYS sees an input. Whether the input is HIGH or LOW is not the same as the input being detected.

That might influence how you write the if statement.

you want to take action if (hint) an input is detected

Probably better expressed as "you want to take action if (hint) a significant (HIGH or LOW) input is detected"