Fruit Keyboard

Introduction

CodeBug’s legs have magical properties. They can sense when something conductive is touching them, such as wire, people or even fruit! By connecting different pieces of fruit to CodeBug’s legs, you can get it to say which piece of fruit has been touched.

You will need
CodeBug CodeBug
Micro USB cable
Computer
CR2032 battery
Crocclips
OR Fruit
Vegetables

1 Question
  • Does it have to be fruit or veg? Guerinboys @ Dec. 24, 2016, 3:53 p.m.


    Answer this question:

  • Ask a new question:

Writing the program

To turn CodeBug into a fruit keyboard, you must first write code that recognises inputs and then scrolls the name of the fruit. Click the link below to follow the simple tutorial to create your program.


  • Ask a new question:

Wire it up

Now you need to wire up a piece of fruit or veg.

  • Connect a croc-clip to the leg labeled GND.

  • Connect another croc-clip from leg 0 to a piece of fruit.

Note: If your CodeBug has gone to sleep, wake it up by pressing either button A or B.

Test your program by holding the croc-clip connected to ground (make sure you touch the metal part), while pressing the fruit repeatedly. You will see the text scroll as you touch the fruit.


1 Question
  • As soon as a croc clip is connected to port 0 the text starts scrolling even if it's dangling loose without touching anything else. WaterThose @ Feb. 21, 2017, 8:51 p.m.


    Answer this question:

  • Ask a new question:

Finishing your keyboard

Now you have made a simple fruit input, you can repeat the process by attaching more pieces of fruit with more croc-clips to CodeBug’s other numbered legs.


  • Ask a new question:

Extending your program

You need CodeBug to sense these other inputs and scroll the names of the fruit.

Click below to extend your fruit keyboard program.


  • Ask a new question:

What next?

Now you have created a fruit keyboard, think of fun things to do with it! Some ideas include using your fruit keyboard as a controller for a CodeBug game or making a fruit burglar alarm.

See what other objects are touch sensitive with CodeBug (hint: anything made of metal or water should work).

You may have noticed that some fruits only require a gentle touch, whereas some need to be squeezed for CodeBug to respond. Try to perform experiments by gathering a wide range of different fruits and test them to see which are very conductive. There could be all sorts of reasons one fruit may conduct better than others, such as the amount of water it contains or the hardness of the skin. Share your results and conclusions, we’d love to hear what you think.


1 Question
  • How do u make a bugular alarm Joshua Ibukunoluwa @ April 26, 2017, 2:35 a.m.

    • first use the instrustions you gust diid and set it to places the burger whats to go — tb9c @ Oct. 15, 2018, 11:05 p.m.


    Answer this question:

  • deleted


    Answer this question:

  • Ask a new question:

Back to top