✨ 1:1 Online Live Robotics & Coding Classes for KidsTry a free class →
🤖 Build real robots at home with our Starter KitsShop kits →
🎮 New! Build circuits on screen in our free Circuit PlaygroundPlay now →
🚀 Inspiring Minds, Igniting FuturesOur story →
Button Controlled LED Pattern

Button Controlled LED Pattern: Press to Change the Show | बटन से एलईडी पैटर्न: दबाकर शो बदलो

Experiment 15 · Arduino Nano Coding & Electronics Kit🎛️

Each press of the button starts a new light pattern.
हर बार बटन दबाने पर नया लाइट पैटर्न शुरू होता है।

🎯 What are we building?

We combine a button with several LEDs. Each press moves to the next pattern: running lights, blinking all, alternate and so on.

Arduino NanoArduino NanoPush ButtonPush ButtonLEDLEDResistorResistorBreadboardBreadboardWiresWires

🔌 Circuit diagram

Arduino Nano5VD2D13D12D11GND10 kΩ220 ΩLED220 ΩLED220 ΩLEDGNDPush buttonnode
Button press→D2 reads HIGH→if pressed ?→D13 HIGH→LED

Pin numbers follow the Kod2Kids books. You can use other pins, just change the same numbers in the code.

🎮 Play with this experiment

⚙️ How does it work?

A counter in the program goes up by one on each press. The code then picks the pattern that matches the counter. When the counter reaches the last pattern it starts again from the first.

🌍 Where is this used in real life?

  • Bicycle lights have a mode button to switch between steady and flashing.
  • Torches have modes: bright, dim and SOS.
  • LED festival lights have a controller to change patterns.

💡 What could YOU invent with it?

Build a “multi-mode safety light” for school bags: steady in the day, flashing at dusk, SOS in an emergency. It could help children be seen and call for help.

🧪 Try this!

Add a fourth pattern of your own. What will you name it?

🎯 हम क्या बना रहे हैं?

हम एक बटन को कई एलईडी से मिलाते हैं। हर दबाव अगले पैटर्न पर ले जाता है: दौड़ती बत्तियाँ, सब का ब्लिंक, बारी-बारी, वगैरह।

Arduino Nanoअरुडिनो नैनोPush Buttonपुश बटनLEDएलईडीResistorरेसिस्टरBreadboardब्रेडबोर्डWiresतार

🔌 सर्किट डायग्राम

Arduino Nano5VD2D13D12D11GND10 kΩ220 ΩLED220 ΩLED220 ΩLEDGNDPush buttonnode
बटन दबाओ→D2 HIGH पढ़ता है→अगर दबा है ?→D13 HIGH→एलईडी

पिन नंबर Kod2Kids की किताबों के हिसाब से हैं। आप दूसरे पिन भी लगा सकते हो, बस कोड में वही नंबर बदल दो।

🎮 इस एक्सपेरिमेंट के साथ खेलो

⚙️ ये कैसे काम करता है?

प्रोग्राम में एक काउंटर हर दबाव पर एक बढ़ता है। फिर कोड काउंटर से मेल खाता पैटर्न चुनता है। आख़िरी पैटर्न के बाद काउंटर फिर पहले पर लौट आता है।

🌍 असली ज़िंदगी में ये कहाँ काम आता है?

  • साइकिल की लाइट में मोड बटन होता है जिससे स्थिर और टिमटिमाती रोशनी बदली जाती है।
  • टॉर्च में मोड होते हैं: तेज़, हल्का और SOS।
  • त्योहार की एलईडी लड़ियों में पैटर्न बदलने के लिए कंट्रोलर होता है।

💡 इससे आप क्या नया बना सकते हो?

स्कूल बैग के लिए “मल्टी-मोड सेफ्टी लाइट” बनाओ: दिन में स्थिर, शाम को टिमटिमाती, आपात स्थिति में SOS। इससे बच्चे दिखेंगे और मदद के लिए इशारा भी दे सकेंगे।

🧪 खुद करके देखो!

अपना चौथा पैटर्न जोड़ो। उसका नाम क्या रखोगे?

🛒 Build this at home! / घर पर बनाओ!Arduino Nano Coding & Electronics Kit · ₹999
अरुडिनो नैनो कोडिंग और इलेक्ट्रॉनिक्स किट

Get the kit / किट खरीदें →

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart

Book A Free Demo Session

Join us for an exciting adventure into the world of robotics and coding! Our Robotics and Coding Class for Kids is designed to inspire young minds, foster creativity, and ignite a passion for technology.

Contact Info

Email

info@kod2kids.com