Skip to content

Commit da3dc13

Browse files
Eric Woottenclaude
authored andcommitted
Rewrite lessons system: Python-first, language-aware, 2 new lessons
Brings the Learn tab in line with the MicroPython pivot. - All 4 existing lessons (Blink Basics, Button Controls LED, Hello WiFi, Phone-Friendly Dashboard) rewritten with proper MicroPython code blocks AND Arduino C++ fallback; teaching comments on nearly every line. The step 'body' paragraphs now explain WHY each construct exists, not just WHAT the code does. - Step code is now an object { python, cpp } instead of a single string. loadLessonStep() picks the right code for the active language and switches Monaco's language highlighting at the same moment. - 2 new lessons added: * 🌈 Rainbow Lights (NeoPixel strip) — single pixel -> rainbow -> animated. Teaches loops, RGB colors, and animation frame-by-frame. * 📸 Photo to Code — guides the user through using the Snap & Code feature itself. Step 3 emphasizes the magic iteration loop. - Lesson cards now show an emoji icon (💡🔘🌈📶📱📸) instead of a generic book-open icon, matching the kid-friendly visual language. - Top of the Lessons tab now shows a small language hint: 'Showing lesson code in <Python|Arduino C++>. Switch with the language pill in the top bar.' - Lesson detail view's button is now 'Try this in Python' (or C++) instead of 'Load this code' — clearer + reinforces the language. - setLanguage() now re-renders the Lessons panel if it's active when the user toggles, so the language hint and code badges update live. - showLessonsList() also re-renders so card view picks up the toggle. - Removed stale reference to .editor-tab (the Monaco file tab was deleted in an earlier UX pass; loadLessonStep was still trying to update its text and silently failing). Lessons tab is now actually useful for beginners learning Python on real hardware. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b5be76d commit da3dc13

1 file changed

Lines changed: 606 additions & 40 deletions

File tree

0 commit comments

Comments
 (0)