スマイリーボタンアクティビティー

このアクティビティではデータを送ったり受けたりする方法を学びます!

  • Get started
  • JavaScript Blocks
  • Radio
Print lesson
  • 年齢 8+
  • 30 分
  • JavaScript Blocks

はじめに

This project introduces sending and receiving data to and from micro:bits.

Teacher Guide

Open

Activity

7 steps

ステップ 1

Place a on button pressed block to run code when button A is pressed.


ステップ 2

Place a show leds block inside on button pressed to display a smiley on the screen.


ステップ 3

Click Download to transfer your code in your micro:bit and try pressing button A.

ステップ 4

Add on button pressed and show leds blocks to display a frowney when button B is pressed.


ステップ 5

Click Download to transfer your code in your micro:bit and try pressing button A or B.

Step Six

Add a secret mode where A and B are pressed together. In that case, add multiple show leds blocks to create an animation...


Step Seven

Click Download to transfer your code in your micro:bit and show it off to your friends!

Challenge

Try to add the following functionality:

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

Learn More

The 'Rock Paper Scissors' activity teaches you how to make a cool game for the micro:bit!

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