[{"element_type":"text","content":"\n  \n        \u003ch1\u003eOverview\u003c/h1\u003e\n\u003cp\u003e\u003cspan\u003eWelcome to the Adafruit guide on creating a stunning Badger Mountain themed art piece! In this guide, we'll show you how to bring your artistic vision to life using the powerful Feather RP2040 microcontroller, along with an array of components including audio jacks, buttons, and LED strips.\u003c/span\u003e\u003c/p\u003e\n      \n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/763/original/2024-01-22_10-16-28_053_%281%29.jpg?1711335639","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eAt the heart of this project lies the Feather RP2040 microcontroller, a versatile and powerful board that serves as the brain of your creation. Powered by the RP2040 microchip, this board offers ample computing power and a rich set of features to fuel your creativity. With the Feather RP2040, you can seamlessly integrate various components such as audio jacks, allowing your art piece to play soothing melodies or ambient sounds, enhancing the overall experience for your audience.\u003c/p\u003e\n\u003cp\u003eBut that's not all! Incorporating buttons into your design enables viewers to interact with your artwork, triggering different animations or effects at the touch of a button. Whether it's changing colors or activating special sequences, the possibilities are endless with the Feather RP2040.\u003c/p\u003e\n\u003cp\u003eFrom tranquil sunset hues to vibrant auroras dancing across the sky, the LED strips offer a kaleidoscope of colors and patterns to mesmerize your audience.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://youtu.be/gFzzDaRiYwM?si=av9hS9B6oId4JKXl"},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eIn this guide, we'll walk you through the process of setting up your Feather RP2040, integrating audio jacks and buttons, and controlling LED strips to bring your Badger Mountain themed art piece to fruition. Get ready to embark on a journey of creativity and innovation as we illuminate the beauty of Badger Mountain through art and technology. Let's get started!\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch1\u003eCircuit Diagram\u003c/h1\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003e\u003cspan\u003eBelow is a wiring diagram illustrating the setup for your Badger Mountain themed art piece using 8 buttons, 1 audio jack, and 1 LED strip separated into pixel subsets:\u003c/span\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/762/original/image.png?1711330112","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eFeather RP2040\u003c/strong\u003e: The central microcontroller that powers and controls the entire setup.\u0026nbsp;\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eAudio Jack\u003c/strong\u003e: Connected to the Feather RP2040 to enable sound output for your art piece.\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eLED Strip\u003c/strong\u003e: Connected to the Feather RP2040, this strip is divided into pixel subsets that can be controlled individually or collectively to create dynamic lighting effects.\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eButtons (8 total)\u003c/strong\u003e: These buttons are connected to the Feather RP2040 and serve as input devices for user interaction. Each button can trigger different animations or effects in your art piece.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThe Feather RP2040 serves as the hub, controlling the audio output, button inputs, and LED strip lighting. Each component is wired to the Feather RP2040 according to its specific pin requirements.\u003c/p\u003e\n\u003cp\u003eYou can refer to the documentation of each component and the Feather RP2040 to identify the appropriate pins for wiring. Additionally, you'll need to write code that interfaces with each component to achieve the desired functionality of your Badger Mountain themed art piece.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch1\u003eCode\u003c/h1\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eOnce you've finished setting up your Feather RP2040 with CircuitPython, you can access the code and necessary libraries.\u003c/p\u003e\n\u003cp\u003eTo do this, click on the link below. It will download to your computer as a zipped folder you can then transfer onto your microcontroller.\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"button","content":"https://circuitpython.org/libraries","metadata":{"class":"btn btn-large btn-block btn-primary","button_type":"primary","target":"_self","zip_folder":"false"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eThis section is where you import the neccessary colors, animation, sound items and regular microcontroller imports.\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"print(\"flop\")\nimport time\nimport board\nfrom audiocore import WaveFile\nimport audiomixer\nimport digitalio\nfrom audiopwmio import PWMAudioOut as AudioOut\nimport neopixel\nfrom adafruit_led_animation.animation.solid import Solid\nfrom adafruit_led_animation.animation.blink import Blink\nfrom adafruit_led_animation.animation.pulse import Pulse\nfrom adafruit_led_animation.animation.comet import Comet\nfrom adafruit_led_animation.animation.colorcycle import ColorCycle\nfrom adafruit_led_animation.animation.SparklePulse import SparklePulse\nfrom adafruit_led_animation.animation.chase import Chase\nfrom adafruit_led_animation.animation.sparkle import Sparkle\nfrom adafruit_led_animation.color import RED, ORANGE, YELLOW, GREEN, TEAL, CYAN, BLUE, PURPLE, MAGENTA, WHITE, BLACK, GOLD, PINK, AQUA, JADE, AMBER, OLD_LACE\nfrom adafruit_led_animation.helper import PixelSubset","metadata":{"language":"python","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eThis section is where we set up different pixel subsets, organize animation, and set up lists for different pins.\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"pixel_pin = board.MISO\npixel_num = 83\npixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.3, auto_write=False)\n\nsign = PixelSubset(pixels, 0, 21)\nboot = PixelSubset(pixels, 21, 29)\nrock = PixelSubset(pixels, 29, 60)\nlupine = PixelSubset(pixels, 60, 68)\ncloud = PixelSubset(pixels, 68, 83)\nsignanimation = Blink(sign, speed=0.5, color=RED)\nbootanimation = Pulse(boot, speed=0.01, color=ORANGE, period=1)\nrockanimation = Sparkle(rock, speed=0.05, color=OLD_LACE, num_sparkles=10)\nlupineanimation = Comet(lupine, speed=0.01, color=GREEN, tail_length=10, bounce=False)\ncloudanimation = Chase(cloud, speed=0.5, color=BLUE, size=4, spacing=3)\n\nbuttonpins = [board.D5,board.D9,board.D11,board.D13,board.D25,board.A1,board.A3,board.SDA]\nledpins = [board.D4,board.D6,board.D10,board.D12,board.D24,board.A0,board.A2,board.SCL]\nbeats = [\"1.wav\", \"2.wav\", \"3.wav\", \"4.wav\", \"5.wav\", \"6.wav\", \"7.wav\",\"8.wav\"]\nanimations = [signanimation, cloudanimation, rockanimation, None, bootanimation, lupineanimation, None, None]\nbuttons = []\nleds = []","metadata":{"language":"python","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eFinally this section is for setting up the WavFile sound mixer so we are able to layer multiple sounds on at the same time along with the actions when a button is pressed.\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"for pin in buttonpins:\n    button = digitalio.DigitalInOut(pin)\n    button.direction = digitalio.Direction.INPUT\n    button.pull = digitalio.Pull.UP\n    buttons.append(button)\nfor pin in ledpins:\n    led = digitalio.DigitalInOut(pin)\n    led.direction = digitalio.Direction.OUTPUT\n    led.value = False\n    leds.append(led)\n\naudio = AudioOut(board.SCK)\n\npath = \"sounds.2040/\"\nnum_voices = len(beats)\n\nmixer = audiomixer.Mixer(\n     voice_count=num_voices,\n     sample_rate=44100,\n     channel_count=1,\n     bits_per_sample=16,\n     samples_signed=True\n)\n\naudio.play(mixer)\nfor i in range(len(beats)):\n    wave_file = open(path + beats[i], \"rb\")\n    wave = WaveFile(wave_file)\n    mixer.voice[i].play(wave, loop=True)\n    mixer.voice[i].level = 0.0\n    time.sleep(1.0)\n\nwhile True:\n    for button in buttons:\n        if not button.value:  # pressed?\n            i = buttons.index(button)\n            mixer.voice[i].level = 1.0\n            wave_file = open(path + beats[i], \"rb\")\n            wave = WaveFile(wave_file)\n            mixer.voice[i].play(wave, loop=True)\n            time.sleep(3)\n            leds[i].value = True\n            if animations[i] is not None:\n                animations[i].animate(show = True)\n        if button.value:\n            i = buttons.index(button)\n            mixer.voice[i].level = 0.0\n            leds[i].value = False\n            if animations[i] is not None:\n                animations[i].fill(BLACK)","metadata":{"language":"python","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch1\u003e\u003cstrong\u003e3D Printing\u003c/strong\u003e\u003c/h1\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eOur FLL team harnessed the power of the Tinkercad 3D printing app to bring our hiking masterpiece to life, demonstrating the incredible versatility and functionality of this innovative tool. Through Tinkercad, we meticulously crafted four essential 3D prints, each playing a pivotal role in the seamless construction of our project. Two prints discreetly supported the background canvas, showcasing the app's ability to execute intricate designs with precision. Another print ingeniously connected the aluminum poles, ensuring the stability of the canvas structure. The final two prints, though hidden from plain view, were the unsung heroes – responsible for securely housing buttons, managing wires, and housing the button box with the embedded speaker. Tinkercad's user-friendly interface and powerful capabilities empowered our team to not only realize our vision but also to engineer a robust and visually appealing solution for our hiking masterpiece.\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/700/original/IMG_0875.jpg?1707785720","metadata":{"caption":""}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/692/original/IMG_0884.jpg?1707785339","metadata":{"caption":""}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/693/original/IMG_0878.jpg?1707785435","metadata":{"caption":""}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/696/original/IMG_0887.jpg?1707785503","metadata":{"caption":""}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/697/original/IMG_0891.jpg?1707785517","metadata":{"caption":""}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/701/original/IMG_0895.jpg?1707785997","metadata":{"caption":""}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/694/original/IMG_0900.jpg?1707785466","metadata":{"caption":""}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/698/original/IMG_0905.jpg?1707785531","metadata":{"caption":""}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/699/original/IMG_0899.jpg?1707785689","metadata":{"caption":""}},{"element_type":"button","content":"https://www.tinkercad.com/things/lrCOIK08Qv3-amazing-bruticus-fyyran/edit?returnTo=%2Fdashboard%3Fcollection%3Ddesigns\u0026sharecode=K2l2Y43PqviIU0WJiuiw8xA_McwhqQp8m5b7IOP7fRU","metadata":{"class":"btn btn-large btn-block btn-primary","button_type":"primary","target":"_self","zip_folder":"false"}},{"element_type":"button","content":"https://www.tinkercad.com/things/aZeqAHbVoA7-cap/edit?returnTo=%2Fdashboard%3Fcollection%3Ddesigns\u0026sharecode=xAdiP6-wUl4F2nzLpU1b-IRDBD6OdvVsSr39A1NI7_A","metadata":{"class":"btn btn-large btn-block btn-primary","button_type":"primary","target":"_self","zip_folder":"false"}},{"element_type":"button","content":"https://www.tinkercad.com/things/lTdLhyQ1FM2-new-box/edit?returnTo=%2Fdashboard%3Fcollection%3Ddesigns%26type%3Dtinkercad\u0026sharecode=HQ00Viwwxhd1nrKXJ9tRjPZgoC8FOqHQS1uXjGzYqs0","metadata":{"class":"btn btn-large btn-block btn-primary","button_type":"primary","target":"_self","zip_folder":"false"}}]