#147
Raspberry Pi Pico Onboard-LED Blinken (GP25 Interne LED)
Das Eröffnungsprojekt der Raspberry Pi Pico-Serie! Wir bringen die interne LED (grüne LED an GP25) zum Blinken, um zu überprüfen, ob die Platine funktioniert — ein klassisches "Hello World"-Erstexperiment. Keine externen Komponenten, nur Pico und USB-Kabel. Der Code ist in **MicroPython** geschrieben (die offiziell von der Raspberry Pi Foundation unterstützte Sprache). Lerne die `machine.Pin`-Klasse, `Pin.OUT`-Modus, `led.on()/off()`-Methoden und `time.sleep()` in Thonny IDE. Verfolge jede Umsch
0.0(0)
1 abgeschlossen

Das Eröffnungsprojekt der Raspberry Pi Pico-Serie! Wir bringen die interne LED (grüne LED an GP25) zum Blinken, um zu überprüfen, ob die Platine funktioniert — ein klassisches "Hello World"-Erstexperiment. Keine externen Komponenten, nur Pico und USB-Kabel. Der Code ist in **MicroPython** geschrieben (die offiziell von der Raspberry Pi Foundation unterstützte Sprache). Lerne die `machine.Pin`-Klasse, `Pin.OUT`-Modus, `led.on()/off()`-Methoden und `time.sleep()` in Thonny IDE. Verfolge jede Umschaltung live in der Serial (REPL)-Ausgabe.
Video
Schaltplan

Quellcode
1# ─────────────────────────────────────────
2# BlueGrays · bluegrays.com
3# Raspberry Pi Pico Dahili LED (GP25)
4# ─────────────────────────────────────────
5# TR: Pico'nun uzerindeki dahili LED'i (GP25) yaniyor — "Hello World" projesi
6# EN: Blinks the built-in LED (GP25) on Pico — "Hello World" project
7# TR: Harici bilesen YOK - sadece Pico ve USB kablosu yeterli
8# EN: NO external components - just Pico and USB cable
9
10from machine import Pin
11import time
12
13# ============ PIN / PIN ============
14LED_PIN = 25 # TR: Dahili LED GP25'te | EN: Onboard LED on GP25
15led = Pin(LED_PIN, Pin.OUT)
16
17print("== BlueGrays: Pico Dahili LED Blink ==")
18print("LED pin: GP25")
19print("Her 500ms'de LED yakip sonuyor / LED toggles every 500ms")
20
21# ============ LOOP ============
22while True:
23 led.on() # TR: LED yak | EN: LED on
24 print("[LED] ACIK / ON")
25 time.sleep(0.5)
26
27 led.off() # TR: LED sondur | EN: LED off
28 print("[LED] KAPALI / OFF")
29 time.sleep(0.5)
30