توهج القلب

Learn about the radio and LEDs in this activity!

  • Get started
  • MakeCode
  • Radio
Print lesson
  • الأعمار 8+
  • 30 دقائق
  • MakeCode Editor

مقدمة

This project builds upon using the LED screen but introduces wireless communication between micro:bits!

دليل المعلم

افتح افتح teacher resources

نشاط

7 steps

الخطوة الأولى

Place the show leds block in the on start block and draw a heart.


basic.showLeds(`
    . # . # .
    # # # # #
    # # # # #
    . # # # .
    . . # . .
    `)
          

الخطوة الثانية

Click Download to transfer your code in your micro:bit!

الخطوة الثالثة

Place another show leds block under the heart to make it blink.


basic.showLeds(`
    . # . # .
    # # # # #
    # # # # #
    . # # # .
    . . # . .
    `)
basic.showLeds(`
    . # . # .
    # . # . #
    # . . . #
    . # . # .
    . . # . .
    `)
          

الخطوة الرابعة

Move the blocks inside the forever to repeat the animation.


basic.forever(function () {
    basic.showLeds(`
        . # . # .
        # # # # #
        # # # # #
        . # # # .
        . . # . .
        `)
    basic.showLeds(`
        . # . # .
        # . # . #
        # . . . #
        . # . # .
        . . # . .
        `)
})
          

الخطوة الخامسة

Click Download to transfer your code in your micro:bit!

Step Six

Place more show leds blocks to create your own animation.


basic.forever(function () {
    basic.showLeds(`
        . # . # .
        # # # # #
        # # # # #
        . # # # .
        . . # . .
        `)
    basic.showLeds(`
        . # . # .
        # . # . #
        # . . . #
        . # . # .
        . . # . .
        `)
    basic.showLeds(`
        . . . . .
        . # . # .
        . # # # .
        . . # . .
        . . . . .
        `)
})
          

Step Seven

Click Download to transfer your code in your micro:bit!

التحدي

حاول إضافة الوظائف التالية:

  • Send a written message to the second micro bit.
  • Allow the user to choose a picture and send it to the other device
  • Allow a third micro:bit to send and receive data

المزيد من المعلومات

Check out the 'Love Meter' lesson to learn about using the device's pins to control the screen.

Selecting this opens external content from our support system, which adheres to their privacy policy.