Tobledrone - Edible Chocolate Drone Controller With Makey Makey

by frasermckay in Teachers > 5

1526 Views, 6 Favorites, 0 Comments

Tobledrone - Edible Chocolate Drone Controller With Makey Makey

Screen Shot 2019-07-23 at 4.47.41 PM.png

Control a DJI/Ryze Tello programmble drone with Makey Makey and Scratch. Requires the Tello drone, node.js (free), the Scratch 2 offline editor, and a computer with wifi. Chocolate controllers taste so better than plastic ones. Unfortunately, this guide doesn't work on Raspberry Pi (it does work on Windows and hasn't been tested on Mac). I'd suggest pretty close adult supervision on this one too - plus an awareness of drone sense and local laws (please only fly low/in safe places with it - it's not as reactive as a proper controller!)

Set Up Arrow Buttons

3c7675bbf96a633046e241a88063e3f001468638192230435797.png
3d9cccb12b1d957658286ec7bbcc9bba11622171401401840931.png

Break up your favourite pointy chocolate bar and arrange four pieces as arrows. Keep them wrapped in a bit of foil - that works better than trying to get the chocolate to conduct without melting it... Keep the pieces separate - don't let the foils touch, or you'll short circuit the buttons.

Connect the Arrows

e9d3fdfefc02446b9eb6e0213046fceb04497759294702654956.png
cebd22de07a9853c7bb023d83074b8fd17158834202065459775.png

Arrow keys

These should be straightforward to connect - use an alligator clip on each foil, and connect to the corresponding arrow keys. Using different colours helps - if you put green as the "forward" arrow, for example, make sure it matches the same arrow on your Makey Makey (or your drone might fly off in the wrong direction).

Earth

Use a conductive earth/grounding wrist strap as the Makey Makey's earth. Make sure the metal part inside touches skin. You must wear this while pressing the chocolate arrows.

Set Up Node.js and Scratch

2e2625d256579565ca23c3d1b21e867443896456473395268005.png
3c659f1fc7c774c17bcbaa9256e5624155689557914379330235.png
229cfc38c384722d9b940f3d8b40e4f24371257186527632774.png
183e6d822256e442365316fce909a77159143372465252416605.png

Using Scratch with the Tello drone is best described elsewhere.

In short, you need this zip file from the drone manufacturer. Extract the files. You will need node.js (free) and the Scratch 2 offline editor. Once you have these, open the Node.js command prompt, type cd to change the folder (see the screenshot) to where you've saved your downloaded files. Type node tello.js.

Once this is up and running, open Scratch. Hold down shift, and click File menu. Choose Import Experimental HTTP Extension. Choose the file Tello.s2e. If it's worked properly, you should see the Tello blocks in Scratch, and a green status light (see the last screenshot).

For more advice on getting the Tello working with Scratch, try reading around online.

Write the Scratch Program

9001a4b4f961b03142cfbca8977e5fa40400346175499115962.png
876974ce89f770fd54ce247d9482cecd17227484873278474014.png

Using the Tello extension blocks, my program takes off when the flag is clicked (see the screenshots). My first step was to make an emergency landing mode (space key) that stops all other scripts and sends an instruction to land (more on this later).

Once that's in place, add when key pressed blocks for the four arrows (up/down/left/right) and Tello blocks to fly in that direction. A word to the wise - make sure you fly forward and back, not up and down. This caught me out first time when my drone landed instead of flying back!

I've attached a Scratch 2 file that you could also use.

Test It Out (safety First!)

34e01c39a19edf731bac7e08799718bb08623444592275313890.png
cae145ca1cccac670ed925570b76a42913901431512256501580.png

I suggest testing the Makey Makey connections before the drone is connected at all - check that the logic of the program works, and the blocks run (light up) when you expect. This makes it less likely the drone will be flying in the wrong direction when you start.

You can always press space to land. But I decided I wanted a physical control too. Hence, my safety banana. Grabbing the banana makes the drone land wherever it is - so don't try to land over, say, water. In fact, given it's a tiny "toy" drone being controlled by chocolate and Scratch, don't fly over water/people/buildings at all!!

More seriously - clear the area. Make sure you have a big space, and don't go high (using this program, the drone will fly at around 2m height and not climb any higher). Keep people and things well away!

Have an adult in charge!

First Flight...

89fd11cd5f32abe634621328aa2b04d406217058080853739346.png
2df2e4cd195a5ef6537ecc5a3b2471ce12916537161170070629.png
ezgif-2-a6b4fb4062215977261379960548610.gif

Setting up

When you've taken safety steps and tested the connections, switch on the drone. As mentioned at the start, make sure your computer's using wifi. Connect to the Tello's network and startup node.js and the Scratch program.

Taking off

My program takes off with the flag (yours might be different). Even once the drone is airborne, it won't move for the first few seconds. Give it time to orient itself before you try pressing the arrows. Try gently moving forward (one press) to get a feel for the controls, before you try anything more adventurous.

Eat Your Controller

c8ce5a4b307833fb47f8e824d345b86c0437107622135757981.png

The major benefit over a conventional controller is that this one is also delicious.