Brittany Bull
Published © MIT

Valentine's Day Inspired Beating Heart and Message

Beating Heart and Message using the BBC Micro:bit and XinaBox xCHIPs. So here's your geeky, sweet project for February.

BeginnerFull instructions provided5 minutes1,030
Valentine's Day Inspired Beating Heart and Message

Things used in this project

Hardware components

XinaBox IM02
×1
BBC micro:bit board
BBC micro:bit board
×1
OD01
XinaBox OD01
×1
MD01
XinaBox MD01
×1
PB04
XinaBox PB04
×1
XC10
XinaBox XC10
×1
AA Batteries (generic)
×2

Software apps and online services

MakeCode
Microsoft MakeCode

Story

Read more

Code

VDayInspiredcode

JavaScript
JavaScript code for the BBC Micro:bit and XinaBox xCHIPS. Paste in www.makecode.microbit.org and convert to blocks to adjust. It shows a beating heart on the LEDs of the Micro:bit and a message on the OLED screen of the OD01
input.onGesture(Gesture.Shake, () => {
    OLED.showString("Have a Fabulous Feb!")
    OLED.showString("May it be filled with love and laughter")
    basic.showLeds(`
        . # . # .
        # # # # #
        # # # # #
        . # # # .
        . . # . .
        `)
    basic.showLeds(`
        # # . # #
        # # # # #
        # # # # #
        . # # # .
        . . # . .
        `)
    basic.showLeds(`
        . # . # .
        # # # # #
        # # # # #
        . # # # .
        . . # . .
        `)
    basic.showLeds(`
        # # . # #
        # # # # #
        # # # # #
        . # # # .
        . . # . .
        `)
})
OLED.init(64, 128)
basic.showIcon(IconNames.Heart)
OLED.showString("Happy Love Month!")
basic.forever(() => {
	
})

Credits

Brittany Bull

Brittany Bull

4 projects • 8 followers
A student exploring the world of coding and IoT from a beginners' perspective

Comments

Add projectSign up / LoginAbout BBC micro:bit