Skip to content
Wish Lists Cart
0 items

Hallowen Coding Activities with Picobricks

06 Nov 2023
Hallowen Coding Activities with Picobricks

Table of Contents

    How To Make a Fun Halloween Coding Activity For Kids?

    We have put together an engaging activity of programming for kids, offering an enjoyable and easy way to enhance their programming skills during the Halloween season. Let’s explore this exciting Picobricks Project without the need for prior programming experience!

    This day is one of the most beloved holiday seasons for people of all ages. But, how can you make this special day, filled with witches, ghosts, and fun costumes, even more exciting? This is where Picobricks and programming come into play! In this article, you’ll explore some fantastic programming activities and ideas that you can use to make this holiday even more enjoyable and educational!

    Halloween Computer

    Do you need a computer to bring your Halloween program ideas to life? Here’s another area where Picobricks can assist you. Picobricks offers you an easy coding experience, allowing you to create your own interactive Halloween games or projects with your children. PicoBricks is a fantastic way to show your kids how much fun programming can be!

    Additionally, Picobricks offers an engaging platform for block coding for kids, making it an ideal choice for young learners and beginners in the world of programming. With its intuitive and user-friendly interface, Picobricks allows children to explore programming concepts by assembling code blocks like pieces of a puzzle. This approach to block coding fosters creativity and problem-solving skills in young minds while keeping the learning process enjoyable. Whether it’s creating simple animations, games, or interactive projects, Picobricks empowers kids to bring their ideas to life through programming, all in a fun and educational manner.

    Halloween Coding Activity

    What is the most fun holiday? Most of us would answer this question with anything other than Halloween! The tradition of dressing up in costumes and going door-to-door for candy has become an integral part of this special day. However, this year, you may want to try a new approach to make the holiday even more special and fun. Yes, dressing up in costumes and having fun is a blast. But how about adding a touch of creativity to your Halloween program this year?

    As the holiday approaches, it’s the perfect time to infuse a bit of coding into the holiday spirit. Halloween coding activities are not only a fun way to celebrate but also a fantastic opportunity to introduce kids to the world of programing. This day can become a magical experience when combined with programing!

    Halloween Coding Project

    We’ve prepared a special project just for this special day. Whether you’re a parent, teacher, kid or a young coder yourself, here is a spectacular idea to make this holiday a creative adventure to remember!


    Details and Algorithm


    In this project, we connected 24+6 addressable LED strips to the connectors of the PicoBricks RGB LED module. We placed these LED strips inside 3D-printed pumpkin shapes to create a fire simulation effect. At the same time, we played the Harry Potter melody through the buzzer!


    Let’s get started…


    1X PicoBricks

    24+6 Addressable LED Strips

    Python Codes of the PicoBricks


    from time import sleep
    from machine import Pin,Timer,I2Cfrom picobricks importWS2812,tones,SSD1306_I2Cimport random
    import utime
    buzzer_pin = machine.Pin(20, machine.Pin.OUT)
    buzzer = machine.PWM(buzzer_pin)
    buzzerPlayTime =0
    musicStart =0
    notes =["B4","E5","G5","F#5","E5","B5","A5","F#5","E5","G5","F#5","D#5","F5","B4"]
    durations =[500,750,250,500,1000,500,1500,1500,750,250,500,1000,500,1500]
    tempo =400
    def set_tone(note):
    led_count =25
    ws2812 =WS2812(led_count, brightness=1)
    start_color =(255,60,0)
    brightness =0
    burn_colors =[(255,69,0),(255,50,0),(255,36,0),(255,20,0),(255,10,0)]
    i2c =I2C(0, scl=Pin(5), sda=Pin(4), freq=200000)
    oled =SSD1306_I2C(128,64, i2c, addr=0x3c)
    def happyHelloween():
        global notes, durations, r, g, b, i, randColor
        oled.text("{}".format("HELLOWEEN"),35,35) True:if(utime.ticks_diff(utime.ticks_ms(), musicStart)> buzzerPlayTime):if noteCounter >=len(notes):
                noteCounter =0set_tone(notes[noteCounter])
            buzzerPlayTime = durations[noteCounter]*0.7
            musicStart = utime.ticks_ms()
            noteCounter +=1for i inrange(led_count):if brightness <1:
                brightness +=0.02if brightness >1:
                brightness =1if random.random()<0.3:
                color = burn_colors[random.randint(0,len(burn_colors)-1)]
                ws2812.pixels_set(i, color)else:
                color =(int(start_color[0]* brightness),int(start_color[1]* brightness),0)
                ws2812.pixels_set(i ,color)

    PicoBlockly Codes of PicoBricks

    block coding for hallowen project


    Click for the pumpkin's GitHub link

    Prev Post
    Next Post

    Thanks for subscribing!

    This email has been registered!

    Shop the look
    Choose Options

    Edit Option

    Have Questions?

    Back In Stock Notification


    Product SKURatingDescription Collection Availability Product Type Other Details
    this is just a warning
    Shopping Cart
    0 items
    Same Day Shipping No Extra Costs
    Easy Returns Guarantee Return with Ease
    Secure Checkout Secure Payment