[No.18]クマをパンチでKO!運動不足解消装置
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/Mxn1V2RJebm8t2skQd6dI.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=D0W%2FVTb9aGj9aDqyYB4lA6lYX9Q%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
食欲の秋、読書の秋、スポーツの秋……ですが、食べたり読んたりを楽しんでスポーツは後回しという方も多いのでは? 日々のちょっとしたエクササイズを三日坊主にならずに続けられるように、モチベーションの上がる装置「クマをパンチでKO!」を作ってみましょう!!
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/Pzo0rVCmccTobPIXBkf0S.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=60%2FakeKvBb8TVV7gflKC%2BjLKjII%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
必要なもの&準備
- SPACEBLOCK通常パッケージ[SPACEBLOCK本体、USBケーブル、電池ボックス]
- 赤外線障害物回避センサモジュール(障害物回避センサ)
- 180°マイクロサーボモーター(サーボモーター)
- 8×8 RGB LEDマトリックスパネル(LEDパネル)
- ジャンパーワイヤ[ピンヘッダ-ピンソケット3本×延長したい数]
- プログラミングをするパソコン
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/xn89x53qNYuaBXUZmZNC_.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=6MsLhZHqF6lkOmexQ4g4E4BdYbM%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
SPACEBLOCKに拡張パーツを接続する
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/OxNxzI0qiQ0aGYjRZ4BPf.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=SDi8rzpHxCBjZTqMBg8luBHaX7M%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
接続の細かい部分は次の図で確認してください。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/VXnze05TK3aAYrBm2g6Y1.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=Rdwo91Xw467LngO8lzB96ItN46I%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
クマなどの工作部分を作ろう
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/JjbQNgRgqJSdH_2gElGGB.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=19bnGhzFnk6YhB6wJpLT%2BA5iAx4%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/fWPix1IBLOYWGhRK_TZ0u.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=rqLjd75dU5ukqMlnqeRxp138tNo%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/j9vSCVAQl3x8PsHsoAYLC.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=xVzyVrcVZhjAAULYW9n29gZATvY%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
長い軸にクマ、草のパーツをケース手前に貼り付けるとすっかりそれらしい雰囲気に!
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/HFo82KzF0pB-1bYDNJI3j.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=h6xnO8IRcbH5Vxh%2FgdHo6lDK0Sc%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
この段階で、プログラムを作成して微調整をしてから次の工程に移ると作業がしやすいのですが、ここでは続けて最後まで装置を完成させてしまいます。
草の装飾パーツを一旦はずして、SPACEBLOCKなどをすべてケースの中に入れます。写真を参考に障害物回避センサーとLEDパネルを内側に固定し、サーボモーターのジャンパーワイヤは穴を通して内側に入れます。
![](https://s3.ap-northeast-1.amazona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qcKsHTvZqzNLw%3D%3D)
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/g5FToTVJIw-KQcUgRRmB1.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=AaZmkxE5uTFiyNxZ90rwHdckEzI%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/mmXjdEiQNlp8-I4kJMU17.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=aaiwG1abWkwmNDaK9eSq5785PAA%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
障害物回避センサの使い方と値の取り方
プログラムでは障害物回避センサの値を使います。障害物回避センサは以前「[10]自動で開くゴミ箱を発明!」で詳しく使い方を紹介しましたが、プログラムに使うブロックが違うので簡単に復習しましょう。
障害物回避センサは、赤外線によって一定の距離内に障害物があるかどうかを検知することができます。障害物が「ある」か「ない」かの2つの情報だけを渡すデジタル入力です。
障害物回避センサは、何も障害物がない状態ならば挿したピンヘッダの電圧を高くしてtrue(トゥルー)という値を、何か障害物があると電圧を下げfalse(フォルス)という値をプログラムに渡します。true(トゥルー)とfalse(フォルス)はブール値といって、条件式などで使います。プログラムでは、[《A0》の電圧デジタル読取]ブロックで値を取ります。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/QPVYRZ-t-1pT934kkLd6-.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=6KcAnE2JYTg%2Bt8P%2BkkQa5mFr3o4%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
障害物の検出距離は、障害物回避センサについているポテンショメータをドライバなどで回して調節します。今回はパンチの動作に反応させたいので、あまり距離を短くしすぎると、うっかり装置を直接パンチしてしまうかもしれません。ある程度の距離で反応するように設定しておきましょう。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/ARb5yf33zZ8x1jTD6dCYU.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=pwWU7v3FJouLM10ME7Bdo%2FKkzxM%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
パンチがきたらクマが倒れるプログラム
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/XN1gCkyagwJ3jj2765IpB.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=V1efXzEL1Q7qMDoyH4mB6fx9R5w%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
[もし《 》なら…でなければ…]ブロックの条件部分には、障害物回避センサの値を指定しています。障害物回避センサの値はtrueかfalseのブール値です。ブール値はtrueならば条件にあっていると判定され、falseならば条件にあっていないと判定されます。
さて、これでパンチでクマが倒れる仕組みはできました。エクササイズのモチベーションを上げるために、さらに、パンチの回数を数える仕組みを追加してみましょう。
回数をカウントする
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/3NEsYrcXuV27gkHdKv82c.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=d0aoIwBrm2E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ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=0U89RNFKLzlmk6bJptcftyP4iis%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
変数から今入っている値を取り出して1足した値をまた変数に入れると、繰り返すたびに変数を1ずつ値を増やすことができます。回数を数えたり点数を数えたりする仕組みをプログラムするときに便利なので、覚えておきましょう。
回数は数えられるようになりましたが、コンソールに表示しても、「クマをパンチでKO!」装置として使うときには回数を見ることができません。もうひと工夫しましょう。
10回パンチしたらカラフル演出でインターバル
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/aN9uwH7JuE5w1RHpUx--U.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=Bx0nr0WGa%2FSqspvVHVCd1YI%2BZS4%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
これで「クマをパンチでKO!」の完成です!
SPACEBLOCKにプログラムを転送したら、さっそくパンチしてみましょう! 10回ごとにインターバルをおきながらエンドレスにエクササイズが楽しめます。センサーに何かが近づけばいいので、パンチだけでなくハイキックにしてもOK。置く場所を低くすれば、もも上げ運動にも使えますよ!
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/6LjKtMBKZZP_jIDegR1yQ.jpg?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=gOm%2FoQSuZ9HB9blt83peCjZZUbE%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdWhnaxEnqUg52%2BaqRFs6cUMUSREhjzFcpu7NuoWuTRh6mSypK2emcrHZR07XP%2F0NVv8IL8zOsrHNyRokmdDQXHeZReT%2Bn%2FlMbLIGIg59sWIC7%2B2752noShjJHHWv%2FQLKvxCg7xqrBoliJ6i2l8R83JzaJrrBkY3MhA5ptqxUcsAAtumUSRPgopjdrAAwsN0yviL9aIYZLbGxqOXHNlfNx%2Bo5HcOEzVuE%2F5yOZ%2BvJJODecPLIFObMPaU9LYGOp0B2eLKz8GlBqxdNowsI%2BmhoU7y45XhYmV8u52oOMfJnmQfM6QgdgTNsq20izYPkX2mM1jjSW0pA66qB1TKbKGLYL4cQbhnQ03NN%2BL3ZAhIfMfFOHJee%2BxZYJOkS27rwyJoi06r4W97VmdTMKHPLu6bvvzqu%2F8ikiLIAuaFqdmyO6%2BK6CnUIaHnhgcR79Bd2M69ktHQHqcKsHTvZqzNLw%3D%3D)
10回に達したらLEDの演出の間ひとやすみ。回数は0にリセットされるので、また次の10回を続けてやりましょう!
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/TOJov_0Yey4hqO-nZO9_t.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770011&Signature=D785o6PSNvKdaOcHkMLRkrxXm2M%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEBIaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfM5u%2B8u2RgeBUerDvFxtux%2F2xbFkN60i2sB7SLNEmmQCIQDu%2BeJQLvvOVeTJPpg4%2BCeNUuodg5xO9h8dHr81XlE7QCqUAwg8EAEaDDY3MzU4OTg5Nzk1NSIM6DLui2OwS0ort6yNKvECJ3W6zoqqFaUrW9v8rTtYRGPzlVtF7b4hXyI4EKJ%2FXbk2k1GfdLpmFY%2FLIwWwsaCFLsfJlzfs84XBY1NWLeW8abfUekA%2F9dkAxZLyGQTNzhaQ1YdNsbL0V7LlMy%2FkHvyDQMTsCjC2v2EcvLvC8JVF7krG2ME4WMHpv5HpOsdKX8ZSojrMbPTEKSLVskSrKijglgGvssv0N8re1Qdx0djM4awCWpDIxfzcO0rqEbvQJHfPwdKKyhIIPZolIdW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