[No.5]ボタンを押したら何かがおきる!〜「オカエリ」電光表示
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/_991F5uOcJQ_8IeXUKYFN.png?AWSAccessKeyId=ASIAZZVIWFLR2OJE5HA5&Expires=1725765806&Signature=oMzynH9x4mDkyMiG1hExJh4mAvI%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgImi6akdebs5WWwX%2F7kSO9%2F35AkN6R43Rh3M%2F49tKHAECIE3dkeJOWyiy%2F2VP17lCDAHRZDHl%2Bb2YXBO%2FdzK7drJnKpQDCDoQARoMNjczNTg5ODk3OTU1Igx2UOHfPj9DadNjSLkq8QJt5yMTUAS%2Fhw6U2iphhqm3R4zYQRW%2FiZXXKhJbTWnW4u%2Beu85c2uOazfbDMdZvmLoJ6J3gXGsvT1EYhgr64Heb8ZQM%2BwruXc2%2BunyAkL0ybK60G5zh0%2F1yCbD9tLc3DKH6T6gTjXC1VeqheuCjilu%2Flo6W52JwQE91yXD0a%2BUjlUelbGmwTdocRlKsq904mdIL5P9ieZSyJGl%2FDHF0tz2Ks4zh3bBziIkm7heGz%2B%2FbaYY5EjTB%2BlyTo72pmF3Tye9xf2fEDV6U2N%2BiuZ7AxSuSd2YmV9lPXrthKcwcze%2Bv4JRyxnGKxi9cdtrlfVQJ%2BzXwBqX%2BsE6tDXpIL%2FDRNZefl7eH3MUTvbOb5YHnRrdHOBTI9cIO3TyDLlxzjR08Hc7daF7%2FEA067czXhd9TGz89RKyJ8In%2FK7m47beY5R33ZmfxuxJ%2Bvk5u26KHPEMZcxPL6CoYoh6IBqpWVMC3qJPGPQTMia7qVqrHplYoy8yDJacw5vDztgY6ngG1VMvwhYq%2FR6iTp1dxwp1GlC%2BFQEoY%2BbdC2FxvmM1Mw2r13qvo6tK9JvyHf54%2Bh97t2wNx5rhuM57JedcN%2BNR5mcvln%2By4XoUXy1OkN5sCERhje%2F3uOOIxje4AVzhIY4uYzsBm0L4A%2B1GWOSvty4a6OOYgV8Tln2Myc0BlNSJ1M08u9%2BYDSyHCSpCWNEXiGPM6b5xTqtwpO5QkRIZfdw%3D%3D)
小さなものづくりコンピューター「SPACEBLOCK(スペースブロック)」を使って、LEDパネルの電光表示装置を作りましょう。[SPACEBLOCK-4]では、電源を入れたら8×8 RGB LEDマトリックスパネル(LEDパネル)が光るというプログラムでしたが、今回は、「ボタンを押したらLEDが光る」というプログラムにアレンジします。
必要なもの&準備
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/vW-EwTIxazp_DxxX-nw8A.png?AWSAccessKeyId=ASIAZZVIWFLR2OJE5HA5&Expires=1725765806&Signature=1vBz%2Bxe2FFlnRlv4TM%2BqVBiIbu8%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgImi6akdebs5WWwX%2F7kSO9%2F35AkN6R43Rh3M%2F49tKHAECIE3dkeJOWyiy%2F2VP17lCDAHRZDHl%2Bb2YXBO%2FdzK7drJnKpQDCDoQARoMNjczNTg5ODk3OTU1Igx2UOHfPj9DadNjSLkq8QJt5yMTUAS%2Fhw6U2iphhqm3R4zYQRW%2FiZXXKhJbTWnW4u%2Beu85c2uOazfbDMdZvmLoJ6J3gXGsvT1EYhgr64Heb8ZQM%2BwruXc2%2BunyAkL0ybK60G5zh0%2F1yCbD9tLc3DKH6T6gTjXC1VeqheuCjilu%2Flo6W52JwQE91yXD0a%2BUjlUelbGmwTdocRlKsq904mdIL5P9ieZSyJGl%2FDHF0tz2Ks4zh3bBziIkm7heGz%2B%2FbaYY5EjTB%2BlyTo72pmF3Tye9xf2fEDV6U2N%2BiuZ7AxSuSd2YmV9lPXrthKcwcze%2Bv4JRyxnGKxi9cdtrlfVQJ%2BzXwBqX%2BsE6tDXpIL%2FDRNZefl7eH3MUTvbOb5YHnRrdHOBTI9cIO3TyDLlxzjR08Hc7daF7%2FEA067czXhd9TGz89RKyJ8In%2FK7m47beY5R33ZmfxuxJ%2Bvk5u26KHPEMZcxPL6CoYoh6IBqpWVMC3qJPGPQTMia7qVqrHplYoy8yDJacw5vDztgY6ngG1VMvwhYq%2FR6iTp1dxwp1GlC%2BFQEoY%2BbdC2FxvmM1Mw2r13qvo6tK9JvyHf54%2Bh97t2wNx5rhuM57JedcN%2BNR5mcvln%2By4XoUXy1OkN5sCERhje%2F3uOOIxje4AVzhIY4uYzsBm0L4A%2B1GWOSvty4a6OOYgV8Tln2Myc0BlNSJ1M08u9%2BYDSyHCSpCWNEXiGPM6b5xTqtwpO5QkRIZfdw%3D%3D)
ボタン操作のプログラム
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/6RXy9QQ_aIjdN47fOIH-c.png?AWSAccessKeyId=ASIAZZVIWFLR2OJE5HA5&Expires=1725765806&Signature=wmnmFsWWD%2BUncvvqjpxWitWSfvs%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgImi6akdebs5WWwX%2F7kSO9%2F35AkN6R43Rh3M%2F49tKHAECIE3dkeJOWyiy%2F2VP17lCDAHRZDHl%2Bb2YXBO%2FdzK7drJnKpQDCDoQARoMNjczNTg5ODk3OTU1Igx2UOHfPj9DadNjSLkq8QJt5yMTUAS%2Fhw6U2iphhqm3R4zYQRW%2FiZXXKhJbTWnW4u%2Beu85c2uOazfbDMdZvmLoJ6J3gXGsvT1EYhgr64Heb8ZQM%2BwruXc2%2BunyAkL0ybK60G5zh0%2F1yCbD9tLc3DKH6T6gTjXC1VeqheuCjilu%2Flo6W52JwQE91yXD0a%2BUjlUelbGmwTdocRlKsq904mdIL5P9ieZSyJGl%2FDHF0tz2Ks4zh3bBziIkm7heGz%2B%2FbaYY5EjTB%2BlyTo72pmF3Tye9xf2fEDV6U2N%2BiuZ7AxSuSd2YmV9lPXrthKcwcze%2Bv4JRyxnGKxi9cdtrlfVQJ%2BzXwBqX%2BsE6tDXpIL%2FDRNZefl7eH3MUTvbOb5YHnRrdHOBTI9cIO3TyDLlxzjR08Hc7daF7%2FEA067czXhd9TGz89RKyJ8In%2FK7m47beY5R33ZmfxuxJ%2Bvk5u26KHPEMZcxPL6CoYoh6IBqpWVMC3qJPGPQTMia7qVqrHplYoy8yDJacw5vDztgY6ngG1VMvwhYq%2FR6iTp1dxwp1GlC%2BFQEoY%2BbdC2FxvmM1Mw2r13qvo6tK9JvyHf54%2Bh97t2wNx5rhuM57JedcN%2BNR5mcvln%2By4XoUXy1OkN5sCERhje%2F3uOOIxje4AVzhIY4uYzsBm0L4A%2B1GWOSvty4a6OOYgV8Tln2Myc0BlNSJ1M08u9%2BYDSyHCSpCWNEXiGPM6b5xTqtwpO5QkRIZfdw%3D%3D)
SPACEBLOCKにはボタンが2個ついていて、それぞれに「PA8」と「PA9」という名前がついています。[ボタン(PA8/PA9)が押された]ブロックを使うときは、どちらのボタンへの指示なのか正しく指定しましょう。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/D2JFsN_nrVZ0LKiVJniZw.png?AWSAccessKeyId=ASIAZZVIWFLR2OJE5HA5&Expires=1725765806&Signature=kTn9WU2WSLNvyNsxZoYG9tAKiUU%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgImi6akdebs5WWwX%2F7kSO9%2F35AkN6R43Rh3M%2F49tKHAECIE3dkeJOWyiy%2F2VP17lCDAHRZDHl%2Bb2YXBO%2FdzK7drJnKpQDCDoQARoMNjczNTg5ODk3OTU1Igx2UOHfPj9DadNjSLkq8QJt5yMTUAS%2Fhw6U2iphhqm3R4zYQRW%2FiZXXKhJbTWnW4u%2Beu85c2uOazfbDMdZvmLoJ6J3gXGsvT1EYhgr64Heb8ZQM%2BwruXc2%2BunyAkL0ybK60G5zh0%2F1yCbD9tLc3DKH6T6gTjXC1VeqheuCjilu%2Flo6W52JwQE91yXD0a%2BUjlUelbGmwTdocRlKsq904mdIL5P9ieZSyJGl%2FDHF0tz2Ks4zh3bBziIkm7heGz%2B%2FbaYY5EjTB%2BlyTo72pmF3Tye9xf2fEDV6U2N%2BiuZ7AxSuSd2YmV9lPXrthKcwcze%2Bv4JRyxnGKxi9cdtrlfVQJ%2BzXwBqX%2BsE6tDXpIL%2FDRNZefl7eH3MUTvbOb5YHnRrdHOBTI9cIO3TyDLlxzjR08Hc7daF7%2FEA067czXhd9TGz89RKyJ8In%2FK7m47beY5R33ZmfxuxJ%2Bvk5u26KHPEMZcxPL6CoYoh6IBqpWVMC3qJPGPQTMia7qVqrHplYoy8yDJacw5vDztgY6ngG1VMvwhYq%2FR6iTp1dxwp1GlC%2BFQEoY%2BbdC2FxvmM1Mw2r13qvo6tK9JvyHf54%2Bh97t2wNx5rhuM57JedcN%2BNR5mcvln%2By4XoUXy1OkN5sCERhje%2F3uOOIxje4AVzhIY4uYzsBm0L4A%2B1GWOSvty4a6OOYgV8Tln2Myc0BlNSJ1M08u9%2BYDSyHCSpCWNEXiGPM6b5xTqtwpO5QkRIZfdw%3D%3D)
つづいてLEDパネルのプログラムです。次の図の通り、ボタンが押されたときに、「オ」「カ」「エ」「リ」という文字が順に表示されるようにプログラムします。[RBG LED(A10)を点灯]ブロックで文字を指定し、[一時停止(1000)ミリ秒]ブロックを間に入れて各文字が点灯する時間を作り、最後には[RBG LED(A10)を全て消灯]ブロックでLEDを消します。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/vRE7PaOH0q03d5IeIELQ2.png?AWSAccessKeyId=ASIAZZVIWFLR2OJE5HA5&Expires=1725765806&Signature=KVTE%2FhOKKmZU6UuO7pTo0z8Gr6k%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgImi6akdebs5WWwX%2F7kSO9%2F35AkN6R43Rh3M%2F49tKHAECIE3dkeJOWyiy%2F2VP17lCDAHRZDHl%2Bb2YXBO%2FdzK7drJnKpQDCDoQARoMNjczNTg5ODk3OTU1Igx2UOHfPj9DadNjSLkq8QJt5yMTUAS%2Fhw6U2iphhqm3R4zYQRW%2FiZXXKhJbTWnW4u%2Beu85c2uOazfbDMdZvmLoJ6J3gXGsvT1EYhgr64Heb8ZQM%2BwruXc2%2BunyAkL0ybK60G5zh0%2F1yCbD9tLc3DKH6T6gTjXC1VeqheuCjilu%2Flo6W52JwQE91yXD0a%2BUjlUelbGmwTdocRlKsq904mdIL5P9ieZSyJGl%2FDHF0tz2Ks4zh3bBziIkm7heGz%2B%2FbaYY5EjTB%2BlyTo72pmF3Tye9xf2fEDV6U2N%2BiuZ7AxSuSd2YmV9lPXrthKcwcze%2Bv4JRyxnGKxi9cdtrlfVQJ%2BzXwBqX%2BsE6tDXpIL%2FDRNZefl7eH3MUTvbOb5YHnRrdHOBTI9cIO3TyDLlxzjR08Hc7daF7%2FEA067czXhd9TGz89RKyJ8In%2FK7m47beY5R33ZmfxuxJ%2Bvk5u26KHPEMZcxPL6CoYoh6IBqpWVMC3qJPGPQTMia7qVqrHplYoy8yDJacw5vDztgY6ngG1VMvwhYq%2FR6iTp1dxwp1GlC%2BFQEoY%2BbdC2FxvmM1Mw2r13qvo6tK9JvyHf54%2Bh97t2wNx5rhuM57JedcN%2BNR5mcvln%2By4XoUXy1OkN5sCERhje%2F3uOOIxje4AVzhIY4uYzsBm0L4A%2B1GWOSvty4a6OOYgV8Tln2Myc0BlNSJ1M08u9%2BYDSyHCSpCWNEXiGPM6b5xTqtwpO5QkRIZfdw%3D%3D)
上の図の通り作成したプログラムを実行してみましょう。
プログラミング画面下部の[実行]をクリックしてプログラムを動かしてから、SPACEBLOCK本体のボタン(PA8)を押してみると……あれ? 何も起きません! 画面には、「プログラムが終了しました」の通知が出ています。何もしないうちにプログラムが終了したとはどういうことでしょうか。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/Y5xnxF-OHGN3PAmN9ZzB3.png?AWSAccessKeyId=ASIAZZVIWFLR2OJE5HA5&Expires=1725765806&Signature=mycYDcgz%2BGf8gTWSPvYpDrZ%2F8dw%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgImi6akdebs5WWwX%2F7kSO9%2F35AkN6R43Rh3M%2F49tKHAECIE3dkeJOWyiy%2F2VP17lCDAHRZDHl%2Bb2YXBO%2FdzK7drJnKpQDCDoQARoMNjczNTg5ODk3OTU1Igx2UOHfPj9DadNjSLkq8QJt5yMTUAS%2Fhw6U2iphhqm3R4zYQRW%2FiZXXKhJbTWnW4u%2Beu85c2uOazfbDMdZvmLoJ6J3gXGsvT1EYhgr64Heb8ZQM%2BwruXc2%2BunyAkL0ybK60G5zh0%2F1yCbD9tLc3DKH6T6gTjXC1VeqheuCjilu%2Flo6W52JwQE91yXD0a%2BUjlUelbGmwTdocRlKsq904mdIL5P9ieZSyJGl%2FDHF0tz2Ks4zh3bBziIkm7heGz%2B%2FbaYY5EjTB%2BlyTo72pmF3Tye9xf2fEDV6U2N%2BiuZ7AxSuSd2YmV9lPXrthKcwcze%2Bv4JRyxnGKxi9cdtrlfVQJ%2BzXwBqX%2BsE6tDXpIL%2FDRNZefl7eH3MUTvbOb5YHnRrdHOBTI9cIO3TyDLlxzjR08Hc7daF7%2FEA067czXhd9TGz89RKyJ8In%2FK7m47beY5R33ZmfxuxJ%2Bvk5u26KHPEMZcxPL6CoYoh6IBqpWVMC3qJPGPQTMia7qVqrHplYoy8yDJacw5vDztgY6ngG1VMvwhYq%2FR6iTp1dxwp1GlC%2BFQEoY%2BbdC2FxvmM1Mw2r13qvo6tK9JvyHf54%2Bh97t2wNx5rhuM57JedcN%2BNR5mcvln%2By4XoUXy1OkN5sCERhje%2F3uOOIxje4AVzhIY4uYzsBm0L4A%2B1GWOSvty4a6OOYgV8Tln2Myc0BlNSJ1M08u9%2BYDSyHCSpCWNEXiGPM6b5xTqtwpO5QkRIZfdw%3D%3D)
プログラムを動かし続ける
このプログラムを点検すると、[プログラムを開始]ブロックのあとに何もブロックがつながっていません。命令が何もないのでプログラムは実行されてすぐ一瞬で終了してしまったのです。SPACEBLOCKのボタンを押しても何も起きなかったのは、ボタンを押した時には、既にプログラムが終了してしまっていたからです。
プログラムを動かし続けるには、[プログラムを開始]ブロックに、[繰り返し]カテゴリーの[繰り返す]ブロックをつなぎます。これで、プログラムを一度実行すればプログラムが動き続けるようになります。
[ボタン(PA8)が押された]ブロックは、プログラムが動いている間はずっと、ボタンが押されているかどうかをチェックし続けます。そしてボタンが押されたと検知したら、自分のブロックの内側につながっているプログラムを実行します。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/zuLNq4FYTr8IlxjyOLZle.png?AWSAccessKeyId=ASIAZZVIWFLR2OJE5HA5&Expires=1725765806&Signature=ODGaPrjDLvdR8GzwVoh0Hj%2FTySM%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgImi6akdebs5WWwX%2F7kSO9%2F35AkN6R43Rh3M%2F49tKHAECIE3dkeJOWyiy%2F2VP17lCDAHRZDHl%2Bb2YXBO%2FdzK7drJnKpQDCDoQARoMNjczNTg5ODk3OTU1Igx2UOHfPj9DadNjSLkq8QJt5yMTUAS%2Fhw6U2iphhqm3R4zYQRW%2FiZXXKhJbTWnW4u%2Beu85c2uOazfbDMdZvmLoJ6J3gXGsvT1EYhgr64Heb8ZQM%2BwruXc2%2BunyAkL0ybK60G5zh0%2F1yCbD9tLc3DKH6T6gTjXC1VeqheuCjilu%2Flo6W52JwQE91yXD0a%2BUjlUelbGmwTdocRlKsq904mdIL5P9ieZSyJGl%2FDHF0tz2Ks4zh3bBziIkm7heGz%2B%2FbaYY5EjTB%2BlyTo72pmF3Tye9xf2fEDV6U2N%2BiuZ7AxSuSd2YmV9lPXrthKcwcze%2Bv4JRyxnGKxi9cdtrlfVQJ%2BzXwBqX%2BsE6tDXpIL%2FDRNZefl7eH3MUTvbOb5YHnRrdHOBTI9cIO3TyDLlxzjR08Hc7daF7%2FEA067czXhd9TGz89RKyJ8In%2FK7m47beY5R33ZmfxuxJ%2Bvk5u26KHPEMZcxPL6CoYoh6IBqpWVMC3qJPGPQTMia7qVqrHplYoy8yDJacw5vDztgY6ngG1VMvwhYq%2FR6iTp1dxwp1GlC%2BFQEoY%2BbdC2FxvmM1Mw2r13qvo6tK9JvyHf54%2Bh97t2wNx5rhuM57JedcN%2BNR5mcvln%2By4XoUXy1OkN5sCERhje%2F3uOOIxje4AVzhIY4uYzsBm0L4A%2B1GWOSvty4a6OOYgV8Tln2Myc0BlNSJ1M08u9%2BYDSyHCSpCWNEXiGPM6b5xTqtwpO5QkRIZfdw%3D%3D)
さて、修正したプログラムを実行してみましょう。SPACEBLOCKのボタン(PA8)を押すと、「オ」「カ」「エ」「リ」の文字が順番に1秒ずつ表示されました。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/JNjEK14gfqQZSWhCYmrRM.png?AWSAccessKeyId=ASIAZZVIWFLR2OJE5HA5&Expires=1725765806&Signature=%2FIk%2F%2BTO8ERaosuzuJ7dYR2yMca0%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgImi6akdebs5WWwX%2F7kSO9%2F35AkN6R43Rh3M%2F49tKHAECIE3dkeJOWyiy%2F2VP17lCDAHRZDHl%2Bb2YXBO%2FdzK7drJnKpQDCDoQARoMNjczNTg5ODk3OTU1Igx2UOHfPj9DadNjSLkq8QJt5yMTUAS%2Fhw6U2iphhqm3R4zYQRW%2FiZXXKhJbTWnW4u%2Beu85c2uOazfbDMdZvmLoJ6J3gXGsvT1EYhgr64Heb8ZQM%2BwruXc2%2BunyAkL0ybK60G5zh0%2F1yCbD9tLc3DKH6T6gTjXC1VeqheuCjilu%2Flo6W52JwQE91yXD0a%2BUjlUelbGmwTdocRlKsq904mdIL5P9ieZSyJGl%2FDHF0tz2Ks4zh3bBziIkm7heGz%2B%2FbaYY5EjTB%2BlyTo72pmF3Tye9xf2fEDV6U2N%2BiuZ7AxSuSd2YmV9lPXrthKcwcze%2Bv4JRyxnGKxi9cdtrlfVQJ%2BzXwBqX%2BsE6tDXpIL%2FDRNZefl7eH3MUTvbOb5YHnRrdHOBTI9cIO3TyDLlxzjR08Hc7daF7%2FEA067czXhd9TGz89RKyJ8In%2FK7m47beY5R33ZmfxuxJ%2Bvk5u26KHPEMZcxPL6CoYoh6IBqpWVMC3qJPGPQTMia7qVqrHplYoy8yDJacw5vDztgY6ngG1VMvwhYq%2FR6iTp1dxwp1GlC%2BFQEoY%2BbdC2FxvmM1Mw2r13qvo6tK9JvyHf54%2Bh97t2wNx5rhuM57JedcN%2BNR5mcvln%2By4XoUXy1OkN5sCERhje%2F3uOOIxje4AVzhIY4uYzsBm0L4A%2B1GWOSvty4a6OOYgV8Tln2Myc0BlNSJ1M08u9%2BYDSyHCSpCWNEXiGPM6b5xTqtwpO5QkRIZfdw%3D%3D)
プログラムをSPACEBLOCKに転送してスタンドアローンモードで動かせば、パソコンから切り話して使えます。ボタンを押せばいつでもメッセージが流れる「おかえり電光表示装置」の完成です!
広がるSPACEBLOCKの世界
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/DRYTF7qpnK1HQ73hyR9NA.png?AWSAccessKeyId=ASIAZZVIWFLR2OJE5HA5&Expires=1725765806&Signature=p4ZvBKegff2naexk%2BJ280wL%2B3e8%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgImi6akdebs5WWwX%2F7kSO9%2F35AkN6R43Rh3M%2F49tKHAECIE3dkeJOWyiy%2F2VP17lCDAHRZDHl%2Bb2YXBO%2FdzK7drJnKpQDCDoQARoMNjczNTg5ODk3OTU1Igx2UOHfPj9DadNjSLkq8QJt5yMTUAS%2Fhw6U2iphhqm3R4zYQRW%2FiZXXKhJbTWnW4u%2Beu85c2uOazfbDMdZvmLoJ6J3gXGsvT1EYhgr64Heb8ZQM%2BwruXc2%2BunyAkL0ybK60G5zh0%2F1yCbD9tLc3DKH6T6gTjXC1VeqheuCjilu%2Flo6W52JwQE91yXD0a%2BUjlUelbGmwTdocRlKsq904mdIL5P9ieZSyJGl%2FDHF0tz2Ks4zh3bBziIkm7heGz%2B%2FbaYY5EjTB%2BlyTo72pmF3Tye9xf2fEDV6U2N%2BiuZ7AxSuSd2YmV9lPXrthKcwcze%2Bv4JRyxnGKxi9cdtrlfVQJ%2BzXwBqX%2BsE6tDXpIL%2FDRNZefl7eH3MUTvbOb5YHnRrdHOBTI9cIO3TyDLlxzjR08Hc7daF7%2FEA067czXhd9TGz89RKyJ8In%2FK7m47beY5R33ZmfxuxJ%2Bvk5u26KHPEMZcxPL6CoYoh6IBqpWVMC3qJPGPQTMia7qVqrHplYoy8yDJacw5vDztgY6ngG1VMvwhYq%2FR6iTp1dxwp1GlC%2BFQEoY%2BbdC2FxvmM1Mw2r13qvo6tK9JvyHf54%2Bh97t2wNx5rhuM57JedcN%2BNR5mcvln%2By4XoUXy1OkN5sCERhje%2F3uOOIxje4AVzhIY4uYzsBm0L4A%2B1GWOSvty4a6OOYgV8Tln2Myc0BlNSJ1M08u9%2BYDSyHCSpCWNEXiGPM6b5xTqtwpO5QkRIZfdw%3D%3D)
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/aRg7o2_2rm3bqOjoSYUdR.png?AWSAccessKeyId=ASIAZZVIWFLR2OJE5HA5&Expires=1725765806&Signature=raFqj9nNd33zJBI5eST1ik74Ca4%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgImi6akdebs5WWwX%2F7kSO9%2F35AkN6R43Rh3M%2F49tKHAECIE3dkeJOWyiy%2F2VP17lCDAHRZDHl%2Bb2YXBO%2FdzK7drJnKpQDCDoQARoMNjczNTg5ODk3OTU1Igx2UOHfPj9DadNjSLkq8QJt5yMTUAS%2Fhw6U2iphhqm3R4zYQRW%2FiZXXKhJbTWnW4u%2Beu85c2uOazfbDMdZvmLoJ6J3gXGsvT1EYhgr64Heb8ZQM%2BwruXc2%2BunyAkL0ybK60G5zh0%2F1yCbD9tLc3DKH6T6gTjXC1VeqheuCjilu%2Flo6W52JwQE91yXD0a%2BUjlUelbGmwTdocRlKsq904mdIL5P9ieZSyJGl%2FDHF0tz2Ks4zh3bBziIkm7heGz%2B%2FbaYY5EjTB%2BlyTo72pmF3Tye9xf2fEDV6U2N%2BiuZ7AxSuSd2YmV9lPXrthKcwcze%2Bv4JRyxnGKxi9cdtrlfVQJ%2BzXwBqX%2BsE6tDXpIL%2FDRNZefl7eH3MUTvbOb5YHnRrdHOBTI9cIO3TyDLlxzjR08Hc7daF7%2FEA067czXhd9TGz89RKyJ8In%2FK7m47beY5R33ZmfxuxJ%2Bvk5u26KHPEMZcxPL6CoYoh6IBqpWVMC3qJPGPQTMia7qVqrHplYoy8yDJacw5vDztgY6ngG1VMvwhYq%2FR6iTp1dxwp1GlC%2BFQEoY%2BbdC2FxvmM1Mw2r13qvo6tK9JvyHf54%2Bh97t2wNx5rhuM57JedcN%2BNR5mcvln%2By4XoUXy1OkN5sCERhje%2F3uOOIxje4AVzhIY4uYzsBm0L4A%2B1GWOSvty4a6OOYgV8Tln2Myc0BlNSJ1M08u9%2BYDSyHCSpCWNEXiGPM6b5xTqtwpO5QkRIZfdw%3D%3D)
自分で作った工作と組み合わせたりして、ぜひ装置のデザインも工夫してみてくださいね!
また、コンピューターには入力装置と出力装置がありますが、今回作ったプログラムの場合、ボタンが入力装置で、LEDパネルが出力装置です。ボタンを押す代わりになにか他のものを入力装置にしたり、LEDパネルの他にも出力装置を足したりしたら、もっと便利で楽しい「おかえり電光表示ボード」になるかもしれませんよ。ぜひアイデアを考えてみてください!!