|Hand tools and fabrication machines:|
It's Halloween time and I've decided to make myself a costume.
I needed one that wouldn't limit my movement, vision or be too hot to wear - my two year old still has a lemming sense of direction and needs to be rescued and picked up several times in just one hour.
So I thought of a costume I could hold... a balloon maybe... a cloud balloon.. a cloud balloon with flashing lightening??
I did a quick Google search and found Glowy Zoey's fantastic toddler in a cloud with real rain costume: https://www.youtube.com/watch?v=Ve9fYIcbou0 which made me think this could look really cool.
Putting together my shopping list I considered my options: sewable LEDs that flashed a single colour controlled by a switch, a micro:bit or neopixels controlled by a micro:bit. As I have a bit of time on this project I've decided to go with idea 3
Before the equipment arrived I changed my mind about the balloons. I was going to sew all the lights into a thin piece of material and strap it around the balloons. But I'm terrified of balloons popping. And helium balloons are expensive. So Plan B! A micro:bit controlled lightening cloud umbrella! No popping balloons, easier to add the lights onto and actually with breadboard-friendly neopixels: no need for any sewing whatsoever. Having cables instead of thread is also a really good idea when you consider an umbrella is a metal cage.
Umbrellas also don't fly away when you let go of them.
Love a bit of ye olde testing before making. This is my micro:bit making my neopixel flash using the buttons. This is a normal neopixel - the breadboard friendly ones hadn't arrived at this stage. Its connected precariously using male to male cables.
- Button A makes a random light flash randomly between 0.5 and 2.5 seconds. The micro:bit shows the number of seconds it's pausing for
Code working - tick.
2.1 Solder headers onto the neopixels.
I didn't use all 25 neopixels but they're going to be used eventually and my soldering needs practising. I'm using 4 of them.
I snapped off three headers at a time and soldered the short end into the neopixel, leaving the long end free for the cables to connect onto.
My soldering wasn't perfect. One made my computer disconnect the USB in a panic. Another wouldn't send the data onto the next neopixel - greedy! But overall I'm very happy at my second time ever soldering
2.2 Connect the neopixels together
I used female to female cables to connect the neopixels together.
2.3 Connect the neopixels to the micro:bit
I used the micro:bit breakout board to connect the first neopixel to the micro:bit.
I used craft glue generously around the outside of the umbrella and added the cloud. I have to allow for some loss during the day so I put absolutely lots on.
I downloaded the Mu editor for the micro:bit. This allows you to flash the code straight to micro:bit without having to download it to your PC then upload to the micro:bit. It also allows you to write in micro python.
Button A flashes lightening forever
Button B flashes a rainbow through the lights three times
In hindsight I should have added the neopixels to the umbrella before covering it in fluff. The fluff made the whole thing fragile and heavy. The end result was fantastic though in dark and light environments
micro python lighteningPython
from microbit import * import neopixel from random import randint #set up the 4 neopixels on pin 0 np = neopixel.NeoPixel(pin0,4) while True: if button_a.is_pressed(): while True: #get a random light number randButton = randint(0,3) #TEST display the light that's flashing #display.show(str(randButton)) #set the random light to white, show, flash twice np[randButton] = (255, 255, 255) np.show() sleep(100) np.clear() sleep(150) np[randButton] = (255, 255, 255) np.show() sleep(400) np.clear() #randomly sleep between flashing lights randSleep = randint(500, 1500) sleep(randSleep) if button_b.is_pressed(): #rainbow time! cycle through the rainbow colours 3 times for x in range (0,3): np = (255, 0, 0) np.show() sleep(300) np.clear() np = (255, 127, 0) np.show() sleep(300) np.clear() np = (255, 255, 0) np.show() sleep(300) np.clear() np = (0, 255, 0) np.show() sleep(300) np.clear() np = (0, 0, 255) np.show() sleep(300) np.clear() np = (75, 0, 130) np.show() sleep(300) np.clear() np = (139, 0, 255) np.show() sleep(300) np.clear() sleep(1000) #scare them with some more lightening at the end for x in range (0,4): np=(255,255,255) np=(255,255,255) np=(255,255,255) np=(255,255,255) np.show() sleep(100) np.clear() sleep(200)
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!