Designing NeoPixel Animations with MakeCode for micro:bit // Creative LEDs * 05 *
In this video, I'll show you how to address individual NeoPixels and animate them using two code blocks: "shift pixels" and "rotate pixels." Then, I'll introduce you to creating variables to reference the number of pixels, how to animate pixels using a repeat loop, and how to organize and reuse the code using functions. After watching this video, I hope you'll spend some time customizing and creating animation functions of your own! Ready to code? Go to https://MakeCode.microbit.org Link to Color Picker: https://colorpicker.me/#ff00cb Thanks for watching! Natasha youtube.com/technochic https://instagram.com/technochic Discord - Join the Channel for Project Help, Community, and Inspiration! https://discord.gg/vdeyy9rWSN Participate in the Element 14 Community: https://community.element14.com/microbit Ride with Bike JC: https://bikejc.org/light-up-rides The Full Playlist: https://youtu.be/vaGMm4IGays?si=WPFdW1lsL6mUnCg7 Episode 01 - https://youtu.be/vaGMm4IGays Episode 02 - https://youtu.be/F2w7TIHnuKw Episode 03 - https://youtu.be/5X9AzUUpljw Episode 04 - https://youtu.be/c03qGQsoNjY Episode 05 - https://youtu.be/Vexu92A_Yl8 ✨ YOU ARE HERE Episode 06 - https://youtu.be/gpiKxHPD0hM Episode 07 - https://youtu.be/nNV4528QVQo Episode 08 - https://youtu.be/JpHJH5QsbTM Episode 09 - https://youtu.be/c8R-Q9khym4 Episode 10 - https://youtu.be/OEeU9tP6dZ4 CHAPTERS: 00:00 - Intro to Designing LED Animations 00:14 - Recap: Changing NeoPixel Colors, Speed, and Rainbow 00:32 - The Rainbow NeoPixel Animation, Explained 00:52 - Core Concept: Set Up Pixels, then Animate 01:00 - Trashing MakeCode Blocks 01:10 - How to Address Individual NeoPixel Pixels in Make Code 01:52 - Using the "Set Pixel" and "Show Blocks" 02:50 - What do the "Shift Pixels" and "Rotate Pixels" Blocks Do? 05:10 - Creating a Basic Wipe Effect 05:52 - How to use the Repeat Loop To Create LED Animations 06:52 - Introducing the "Clear" Block 07:20 - Creating a "NumberOfLEDs" Variable 09:03 - How To Move Just One MakeCode Block with Keyboard Shortcuts 09:27 - Rotating One Pixel vs Wipe Animation 09:55 - Creating Functions in MakeCode 10:57 - How to Add Parameters to Functions in MakeCode 12:35 - NeoPixel Color Options in MakeCode 13:17 - Creating a Sequence of Functions with Different Parameters 13:50 - Duplicating Functions in MakeCode 15:33 - The Animation Sequence in Action! 15:55 - Recap: Shift and Rotate Pixels, The Repeat Loop, Functions 16:09 - Homework! Play with Creating Your Own Functions 16:44 - Next Video - Learn to Use the Buttons To Select The Animation PROJECT SUPPLIES: (some links earn commissions) NeoPixel LEDs: Neopixel LED Strip with Alligator Clip Connector: https://adafruit.com/product/3812 https://www.newark.com/adafruit/3812/adafruit-neopixel-led-strip-w/dp/62AC0997?ost=adafruit+3812 micro:bit Controller: https://amzn.to/3uRqn3x https://www.newark.com/bbc-microbit?ost=microbit&rd=microbit LiPo Batteries for micro:bit: *double check polarity before buying!* LiPo Battery (get 500 mAh or more) https://amzn.to/3Tb3DE7 https://www.newark.com/adafruit/1578/battery-voltage-3-7v/dp/52X6819?ost=adafruit+1578 LiPo Battery Charger: https://amzn.to/3SPnGaW micro:bit Cases: *double check version before buying!* https://amzn.to/3VuQoRk https://www.newark.com/MarketingProductList?orderCode=75Y0420,75Y0419,29AC0390,29AC0391,14AC4497,44AC5616,01AH8675,01AH8676,01AH8677,01AH8679,01AH8680,01AH8681,01AH8682 Other Accessories: Velcro Dots (Industrial Strength!): https://amzn.to/4bRDsuG Velcro Squares: https://amzn.to/48rcK9e Velcro Cable Ties: https://amzn.to/3Ice2du Mounting Tape: https://amzn.to/3OWtpum micro:bit watch accessory: https://amzn.to/3uH8zbv Link to Neopixel Bike Lights with Arduino (older LED bike version): https://technochic.net/search?q=Arduino+Bike Battery Safety Info: https://technochic.net/blogs/tech-craft-tutorials/battery-safety THANK YOU!! To everyone who helped make this series possible: Ayla Schermer, Tony Borelli, Beatriz Bofill, The Entire Bike JC Team, Matt Palasz, Casey Walker, Wozzy the Best Dog Ever, Becky Stern, Maria Paula Saba, Zach Kling, Julian C, All the workshop participants, Ian Cole, Allen Paschel, Bright Bikes, The Maker Effect Foundation, Anthony Rubalcaba, Sophy Wong, Allie Katz, Debra Ansell, Charlyn Gonda, Xyla Foxlin, Doug Malnati, Adafruit, The Element 14 Presents team, Jordan Johnson, Kelly Hensen, Pat Standley, The Jersey City Theatre Center team, Olga Levina, Lance Michel, The Jersey City Arts and Culture Trust Fund SUPPORTED BY PUBLIC FUNDS FROM THE JERSEY CITY ARTS AND CULTURE TRUST FUND https://www.jerseycityculture.org/programs/arts-and-culture-trust-fund/
Download
0 formatsNo download links available.