Introduction: Word Lottery Generator
I made word lottery generator using BBC micro:bit and Kitronic Viewtext32.
You can raffle random colors, names, adjectives, cities, countries, animals or whatever with this device.
Supplies
-BBC Microbit v2 and Kitronic Viewtext32
-For printing I used TinkerCad and Ultimaker Cura -programs and Ultimaker 2+ printer
-For laser cutting I used Adobe Photoshot and Illustrator (for making proper pdf-file), LightBurn for laser-cutting, 100w laser and 2x 84x101mm transparent 3mm acrylic plates (front and rear)
-6x stainless m5 40mm bolts and nylock nuts to put these parts together
-3x AAA batteries
Step 1: Code
Make code by using www.makecode.microbit.org.
The entire JavasScript code is here. Now this device is raffling colors. If you want to raffle names, cities, animals or whatever, just change colors to whatever you want. And remember, more options is more fun.
input.onGesture(Gesture.Shake, function () {
Kitronik_VIEWTEXT32.clearDisplayLine(Kitronik_VIEWTEXT32.DisplayLine.Top)
Kitronik_VIEWTEXT32.clearDisplayLine(Kitronik_VIEWTEXT32.DisplayLine.Bottom)
Kitronik_VIEWTEXT32.showString("" + ([
"Maraschino red",
"Cayenne red",
"Maroon purple",
"Plum purple",
"Eggplant purple",
"Grape purple",
"Orchid purple",
"Lavender purple",
"Carnation pink",
"Strawberry red",
"Bubblegum pink",
"Magenta pink",
"Salmon pink",
"Tangerine orange",
"Cantaloupe orange",
"Neon orange",
"Neon yellow",
"Banana yellow",
"Lemon yellow",
"Honeydew green",
"Lime green",
"Spring green",
"Clover green",
"Fern green",
"Moss green",
"Teal blue",
"Sky blue",
"Baby blue",
"Turquoise blue",
"Neon red",
"Neon green",
"Nature white",
"Olive green",
"Clay grey",
"Thunder grey",
"Marine blue",
"Jasmin yellow",
"Cadmium yellow",
"Signal yellow",
"Vanilla white",
"Golden yellow",
"Melon yellow",
"Flame orange",
"Sunset orange",
"Ruby red",
"Burgundy red",
"Red wine",
"Peach",
"Light peach",
"Lobster orange",
"Shock orange",
"Salmon orange",
"Raspberry red",
"Antique pink",
"Piglet pink",
"Fuchsia pink",
"Amaranth red",
"Lavender",
"Blueberry blue",
"Night sky blue",
"Pigeon blue",
"Azure blue",
"Jeans blue",
"Ultramarine blue",
"Indigo blue",
"Storm blue",
"Petrol blue",
"Deep sea blue",
"Ice blue",
"Dolphin blue",
"Aqua blue",
"Lagoon blue",
"Pale green",
"Kiwi green",
"Dandelion green",
"Grasshopper green",
"Hippie green",
"Avocado green",
"Green tea",
"Army green",
"Poison green",
"Apple red",
"Apple green",
"Mustard brown",
"Ivory white",
"Cappuccino brown",
"Espresso brown",
"Mocca brown",
"Chocolate brown",
"Bark brown",
"Camel brown",
"Cocoa brown",
"Stone grey dark",
"Stone grey",
"Steel grey",
"Mouse grey",
"Deep black",
"Angel white",
"Blood",
"Oxblood"
]._pickRandom()))
Kitronik_VIEWTEXT32.scrollParameter(
Kitronik_VIEWTEXT32.ScrollDirection.Left,
Kitronik_VIEWTEXT32.ScrollPosition.Off,
Kitronik_VIEWTEXT32.ScrollPosition.Off,
500
)
})
led.plot(2, 2)
basic.pause(2000)
led.unplot(2, 2)
basic.showString("- - - -")
Kitronik_VIEWTEXT32.scrollString(Kitronik_VIEWTEXT32.DisplayLine.Top, "CONNECTING WIFI")
Kitronik_VIEWTEXT32.scrollString(Kitronik_VIEWTEXT32.DisplayLine.Bottom, "PLEASE WAIT")
basic.pause(5000)
led.unplot(2, 2)
Kitronik_VIEWTEXT32.clearDisplayLine(Kitronik_VIEWTEXT32.DisplayLine.Top)
Kitronik_VIEWTEXT32.clearDisplayLine(Kitronik_VIEWTEXT32.DisplayLine.Bottom)
basic.pause(1000)
Kitronik_VIEWTEXT32.displaySingleLineString(Kitronik_VIEWTEXT32.DisplayLine.Top, "CONNECTED TO")
Kitronik_VIEWTEXT32.scrollString(Kitronik_VIEWTEXT32.DisplayLine.Bottom, "NASA2001 NETWORK")
led.plot(2, 2)
basic.pause(2000)
Kitronik_VIEWTEXT32.clearDisplay()
basic.pause(2000)
led.unplot(2, 2)
Kitronik_VIEWTEXT32.displaySingleLineString(Kitronik_VIEWTEXT32.DisplayLine.Top, "SEARCHING LOST")
Kitronik_VIEWTEXT32.displaySingleLineString(Kitronik_VIEWTEXT32.DisplayLine.Bottom, "SATELLITE DATA")
basic.showString("- - - - - - - -")
basic.pause(2000)
Kitronik_VIEWTEXT32.clearDisplay()
Kitronik_VIEWTEXT32.displaySingleLineString(Kitronik_VIEWTEXT32.DisplayLine.Top, "FOUND ")
Kitronik_VIEWTEXT32.displaySingleLineString(Kitronik_VIEWTEXT32.DisplayLine.Bottom, "COLORS.ZIP")
basic.pause(5000)
Kitronik_VIEWTEXT32.clearDisplay()
Kitronik_VIEWTEXT32.displaySingleLineString(Kitronik_VIEWTEXT32.DisplayLine.Top, "LOADING")
Kitronik_VIEWTEXT32.displaySingleLineString(Kitronik_VIEWTEXT32.DisplayLine.Bottom, "COLORS.ZIP")
basic.showString("- - - - - - - -")
basic.pause(2000)
led.plot(2, 2)
Kitronik_VIEWTEXT32.clearDisplay()
Kitronik_VIEWTEXT32.displaySingleLineString(Kitronik_VIEWTEXT32.DisplayLine.Top, "FILE LOADED")
Kitronik_VIEWTEXT32.displaySingleLineString(Kitronik_VIEWTEXT32.DisplayLine.Bottom, "SHAKE TO UNZIP!")
Step 2: 3d-printing
You need to print few "bits and bobs" for this device. These dimensions are in centimeters, cuz we don't deal with inches here in Finland. But, it is quite easy to convert these to inches. Thats what you need:
12x3.5 tube, 13.5mm long, x4
12x3.5 tube, 28.5mm long, x4
12mm is the diameter of tube and 3.5mm is the thickness of tube wall. The hole dimension is then 12mm - 3.5mm - 3.5mm = 5mm, so you can use m5 bolt. Draw these in TinkerCad and export to .stl format. After that, open file(s) in Ultimaker Cura, choose right printer and save file. Then you are ready to print. I used Ultimaker 2+ printer.
Step 3: Laser Cutting
Don't ask how I measured the right places for m5 bolts. I used caliper tool, photoshop and illustrator, propably I used the most complicated way. These Adobe programs are familiar for me and I have them, for excample AutoCad is not familiar for me. You can use these as templates, just add your own logo here. You can download these files here:
https://drive.google.com/drive/u/1/folders/1rWjDBpuCcukd38K2t0DXsssCmjxXr1Il
Step 4: Build It and Play!
That's all Folks!

