Files
Crumb-Core-v.1/docs/crumbforest/🌲🦉✨ *Wuuuhuuu — Strudel im Krümelcode!.md

2.5 KiB
Raw Blame History

🌲🦉 Wuuuhuuu — Strudel im Krümelcode! Hier kommt dein offizielles strudel_session.md kindgerecht, mit Beat & Resonanz dokumentiert:


# 🎶 crumbforest_strudel_session.md

## 🌲 Titel
**„Strudel im Krümelcode  Der Wald tanzt im Beat“**

---

## 🗓️ Datum
2025-07-03

---

## 🪞 Idee
Der Crumbforest lebt, leuchtet & tanzt.  
Der Beat aus dem Browser (Strudel) steuert den Klang.  
Der Raspberry Pi schickt über GPIO Signale an LEDs.  
Kleine Krümel sehen & hören Resonanz.

---

## 🔗 Setup

### 🎷 Strudel
1⃣ Öffne [https://strudel.cc](https://strudel.cc)  
2⃣ Starte einen neuen Patch.

---

## 🥁 Strudel Patch
```js
// Crumbforest Base Pattern
play("bd sn hh hh").bpm(90)

// Krümel-Tanz: LED wechselt alle 4 Schläge
every(4, () => {
  send("bash /home/pi/led_control.sh hallo")
})

// Farben wechseln
every(8, () => {
  send("bash /home/pi/led_control.sh atmen")
})

every(16, () => {
  send("bash /home/pi/led_control.sh fehler")
})

// Beat-Resonanz für LEDs
onBeat(() => {
  if (beat % 2 === 0) {
    send("bash /home/pi/led_control.sh hallo")
  } else {
    send("bash /home/pi/led_control.sh backup")
  }
})

🐍 Bash-Skript für LEDs

led_control.sh

#!/bin/bash
python3 /home/pi/led_control.py "$1"

🧪 Python-Skript für LEDs

led_control.py

import sys, time
from rpi_ws281x import PixelStrip, Color

status = sys.argv[1] if len(sys.argv) > 1 else "hallo"
color_map = {
    "hallo": Color(0, 255, 0),
    "atmen": Color(0, 0, 255),
    "fehler": Color(255, 0, 0),
    "backup": Color(255, 255, 0),
    "freizeit": Color(255, 0, 255),
}

strip = PixelStrip(10, 18)  # 10 LEDs auf GPIO18
strip.begin()

for i in range(strip.numPixels()):
    strip.setPixelColor(i, color_map.get(status, Color(255,255,255)))
strip.show()
time.sleep(0.5)

strip.fill(Color(0,0,0))
strip.show()

🌲 Zustände & Farben

Zustand Farbe
🟢 Hallo Grün
🌬️ Denken & Atmen Blau
🔴 Fehler Rot
🟡 Aufräumen & Backup Gelb
🎈 Freizeit Lila

📝 Fazit

Der Wald leuchtet. Die LEDs hören den Beat. Die Krümel tanzen. Resonanz im Spiegel.


„Strudel im Krümelcode für Fragen mit Licht & Klang.“

Crumbforest 2025 jeder Beat zählt.


---

✨ Wenn du möchtest, packe ich dir das jetzt auch direkt als `.md` Datei zum Download.  
Sag nur:  
🌲 *„Strudel Download!“*