[No.10]自動で開くゴミ箱を発明!
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/3Z1liVfNnloskNI9fUNJ2.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=OrbKpiqJSqnQrIhW5DLsM7b6tLY%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/MeMh3cmJ4DD7f-To3oHeG.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=RrpOVtm9PSuvdorLX2ZPZiOE%2B%2FI%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)
今回の改造には「180°マイクロサーボモーター」と「赤外線障害物回避センサモジュール」を使いますよ。
必要なもの&準備
- SPACEBLOCK通常パッケージ[SPACEBLOCK本体、USBケーブル、電池ボックス]
- 赤外線障害物回避センサモジュール(障害物回避センサ)
- 180°マイクロサーボモーター(サーボモーター)
- プログラミングをするパソコン
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/NkyJZ4GnvxGcR5aTlwf42.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=fOw6AQb3kMefks1%2FXa7%2Fx9odCj0%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/n-Y8kFME05j1xN-5gM5q2.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=Zm8A0A6%2FrWuR6lw%2FturusZjxkwU%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)
細かい部分は次の図を参考にしてください。障害物回避センサには4本のピンヘッダがありますが、このうち「G」「V」「S」と書かれた3本だけを使います。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/s1HB2PIphSHE587NgdmIl.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=3n3CKWOn2mVCIgLJ%2FglzW%2FW7wL8%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/g32oSZasuOYkeCDLA2LLa.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=hibUkyVt12904hIQizl20d75MZA%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)
プログラムするときは「出力」カテゴリーの[サーボ《A0(T2)》を《90》°に動かす]ブロックを使います。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/YmfQrt8dTRzFXCPs3JvO_.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=5%2FeRfQMdqJMOzBpuZb0M3SgbsmU%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)
障害物回避センサって何ができるの?
障害物回避センサは、赤外線によって一定の距離内に障害物があるかどうかを検知することができます。今回はゴミ箱の近くに手が来たことを検知するために使います。
障害物となるものがあるか、何もないのかを判定してコンピューターに情報を渡すことができますが、障害物までの距離や障害物の大きさなどの情報を渡すことはできません。このように「ある」「ない」など2つの情報だけを渡すことをデジタル入力と呼びます。
障害物回避センサは、何も障害物がない状態ならば挿したピンヘッダの電圧を高くして、何か障害物があると電圧を下げます。なお、今回は使いませんがプログラミングではtrue(トゥルー)とfalse(フォルス)という値を使うことがあり、デジタル入力の場合、電圧が高いときはtrue、電圧が低いときはfalseという値がプログラムに渡されます。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/kb33o0o8aJisck5cKZwve.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=iXy1EzFXIf4vlhRyrMza%2BexVM14%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)
プログラミングには、[入力]カテゴリーの[《A0》の電圧が《上がった》]というブロックを使います。障害物を検出すると電圧は低くなりますから、障害物があるときの動きをプログラムしたいときは、[《A0》の電圧が《下がった》]とします。
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/iMTdOem3SJ1p1GzdIPo3_.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=rXX1RgHYL%2BYlps8%2BDmMrEIsNdIU%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/Fg5q8hZseuniDYjgzmQcO.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=hzeKIL3WiJSaNMd3BTm6Al4AMkI%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/VECQi1jWybu4zFFCC765d.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=gOV%2FBfBkKIK6zIjQjxG2g5ygGqs%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)
作成したプログラムを実行してみると、障害物回避センサに手を近づけると、サーボモーターがウィンと動き、3秒後に元の位置にまたウィンと動きます。
動画でご覧ください。
サーボの力でフタを開ける仕組み
![](https://s3.ap-northeast-1.amazonaws.com/spaceblock.jp-storage/inquiries/2024-03-26/iFb5uSOkwKbHzKx9mN3Pg.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=vMZbCvhMzPUMoDIacUoPYcWPXP0%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/XFSm77K3Qo5ie4WAT_WlU.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=gH9hhxNrkMn4jH%2BDu8Hrq7ESrcg%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/iDQyfC15tWc09h12ctwiu.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=yFOyBJavs4AmnzwQ7oneS4gEoRo%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/qZVx49B2wSLAxOwqZscpb.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=ZufEFMjI15chjQWlIV%2BEyPI7qoE%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/kw57LTMFPWTNsWUZ4Vn0s.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=ZBsxvuDMWwjg5WvAZIbOlI%2B3U3k%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/5lldsj9TqxFn3MXsv2Wq-.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=11doTJSnZhoPzCo5hZacCAm2CCE%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/91hbTZlwVWoDnDTp9R7c0.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=MGpNXLhuHVKehfG4ylanloC%2FZMM%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/oXTXF3NsgRgBj47YXh41x.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=%2FHVAbMGwpngntrS9ew97NdSfSwY%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/p2oUvMT6ip5oxoEeygaku.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=ytBq3QCWL1%2BWQyhh1Idf4sKS%2F%2BA%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/2U2LhCphiTobSEwaXfvcC.png?AWSAccessKeyId=ASIAZZVIWFLRWQMXT63U&Expires=1725770098&Signature=vniSQ6HAZ7G9VfnUIu45D%2Be6q2A%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の発明でどんどん解決していきましょう!!