# GPIO Kontrollü (LED Yakma/Buton Okuma)

```
import machine  
"""
Zaman gecikmesi kullanıcağız. 
Ancak machine kütüphanesinde sleep fonksiyonu mevcut olduğu için bunu yazmamız yeterli.
"""
from machine import Pin
Led=Pin(23,Pin.OUT) 
"""
Led isminde değişken tanımladık.
Bir pini output olarak tanımlamamız gerekiyor.
"""
while True: #Bunu yazdığımızda her saniyede bir GPIO değerimi on yapacak ya da off yapacak.
    Led.on()
    machine.sleep(1000)
    Led.off()
    machine.sleep(1000)

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://teleron.gitbook.io/dashboard/fundamentals/ornekler/gpio-kontrollu-led-yakma-buton-okuma.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
