$USD
  • EUR€
  • £GBP
  • $USD
PROJECTS Halloweenmicro:bit

One Hit to a Colorworld, a Colorful Grapefruit Made Use of micro:bit

DFRobot Oct 30 2018 1346

As a trickster for Halloween, how can we lack an ingenious pumpkin lantern as an equipment?
This time we want to use Micro:bit to make a maker grapefruit lamp that can change color through one hit.

Prepare materials


1. Open grapefruit on the top and remove the pulp inside.


2. Draw and cut the shape of the monster's eyes and mouth. Then Use a fruit knife to engrave them. Clean it after the grave work is done.

3. Open https://makecode.microbit.org/
The first step is to add a light strip function first. The flow of calling instructions is: Advanced ---- add software package --- neopixel. Click neopixel to add the neopixel module.


4. Drag and drop the required programming graphics from the different functions and interlink them.


All programming graphics are distinguished by color. For example, the red module “Set LED to 0” in the figure below is red. You can find the red variable option in the function column on the left. This option will pop up all programming graphics inside this function, select the one that you need.


It should be noted that in the acceleration function, the acceleration direction should be adjusted to z, because the micro:bit defaults to the x-axis parallel to the horizontal plane and the z-axis perpendicular to the horizontal plane.


There are 10 kinds of color of this light strip. You can choose the color according to your preference.

5. After the program is written, connect the micro:bit and the computer with a USB cable, then name it and download it to the micro:bit board.


6. Link the light strip to port P0, attach the battery, place it in the grapefruit shell, and fix it with tape.


Fix the upper line on the top of the grapefruit skin and tie the thread to the small wooden stick or chopsticks, and stitch the two parts of the grapefruit skin together with wool or fine wire. An interesting maker grapefruit lamp is ready!

REVIEW