Pirate Boat

We are making a Pirate Boat using micro:bit, basic:bit, Neopixel light strip, micro servo motors and some additional tools like tape, straws and joints. The boat will rock back and forth while the LED strip will light up it in a colourful sequence. It is inspired by the Viking Ship rides commonly found in theme parks. We love to try those!

This project is originally published in micro:bit Magazine Issue 08, a quarterly publication by CLASSROOM


YOU WILL NEED

  • 1 x BBC Micro:bit
  • 1 x Basic:bit
  • 1 x Neopixel LED strip
  • 1 x 180 servo
  • Tape
  • Straw
  • Joints

STEP 1

Connecting the components
• Attach micro:bit to basic:bit
• Connect micro servo motor to PIN 1
• Connect neopixel strip to PIN 2
• Plug in battery case



STEP 2

Making
Make a skeleton with straws and joints. Also, stick the neopixel on it for decoration



STEP 3

Making
• Make a pirate boat with straws and joints.
• You need to install the 180 servo at the top. It will be used to swing the boat from one side to another



STEP 4

Making
Connect both parts (from step 2 and 3) together. Make sure the servo can move smoothly.



STEP 5

Add a servo extension
• Search for ‘servo’ in the extension page



STEP 6

Add a neopixel extension
• Search for ‘neopixel’ in the extension page



STEP 7

Coding - Initialization to setup all hardware devices
• Initialise 180 servo and neopixel to the initial state



STEP 8

Coding - Servo
• This step codes for the pattern of servo movements - move to one side then move to other side



STEP 9

Coding - Neopixel
• This step codes for the LED flashing pattern and rotate the rainbow LED 1 by 1



STEP 10

Download the hex file into the micro:bit and try to swing your Pirate Boat


Downloads: microbit-MM8_P09_Pirate_Boat.hex

Code and References

Made this activity? Good Job! Now spread the word. Share a photo of your creation on social media with #letsgethacking #PirateBoat