{"id":12336,"date":"2024-10-04T15:49:15","date_gmt":"2024-10-04T12:49:15","guid":{"rendered":"https:\/\/learn.groundstudio.eu\/?p=12336"},"modified":"2025-01-28T16:22:41","modified_gmt":"2025-01-28T14:22:41","slug":"banana-piano-with-arduino","status":"publish","type":"post","link":"https:\/\/learn.groundstudio.eu\/en\/banana-piano-with-arduino\/","title":{"rendered":"Banana piano with Arduino"},"content":{"rendered":"<div data-post-id=\"11972\" class=\"insert-page insert-page-11972 \"><h1 class='insert-page-title'>Introduction<\/h1><\/div>\n\n\n<p>This fun and creative project turns bananas into a musical instrument using an Arduino type development board. With just a few simple components and some basic coding, you can generate notes by touching the bananas, making it a perfect activity for both kids and adults. It&#8217;s an excellent way to learn about electronics and programming while having fun making music. Whether you are new to Arduino or an experienced enthusiast, the Banana Piano is a fun and educational project that everyone can enjoy!<\/p>\n\n\n<div data-post-id=\"12338\" class=\"insert-page insert-page-12338 \"><h1 class='insert-page-title'>Required hardware<\/h1><\/div>\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-center\" data-align=\"center\">Name<\/th><th class=\"has-text-align-center\" data-align=\"center\">Qty<\/th><th class=\"has-text-align-center\" data-align=\"center\">Image<\/th><th class=\"has-text-align-center\" data-align=\"center\">Buy here<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">Bananas<\/td><td class=\"has-text-align-center\" data-align=\"center\">8<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" class=\"wp-image-12362\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/1021.png\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/1021.png 200w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/1021-150x150.png 150w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/1021-12x12.png 12w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"100\" height=\"100\" class=\"wp-image-12363\" style=\"width: 100px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/Untitledfvsd.png\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/Untitledfvsd.png 225w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/Untitledfvsd-150x150.png 150w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/Untitledfvsd-12x12.png 12w\" sizes=\"auto, (max-width: 100px) 100vw, 100px\" \/><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">GroundStudio Jade U1<\/td><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"125\" class=\"wp-image-12346\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/placa-de-dezvoltare-jade-u1-1.png\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/placa-de-dezvoltare-jade-u1-1.png 707w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/placa-de-dezvoltare-jade-u1-1-300x251.png 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/placa-de-dezvoltare-jade-u1-1-14x12.png 14w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/ro\/electronica\/1728-placa-de-dezvoltare-jade-u1.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Breadboard 830<\/td><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" class=\"wp-image-12349\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/breadboard-830.jpg\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/breadboard-830.jpg 900w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/breadboard-830-300x300.jpg 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/breadboard-830-150x150.jpg 150w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/breadboard-830-768x768.jpg 768w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/breadboard-830-12x12.jpg 12w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/ro\/electronica\/33-breadboard-830.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Aligator clips wire<\/td><td class=\"has-text-align-center\" data-align=\"center\">8<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"117\" class=\"wp-image-12353\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/fire-cu-clips-crocodil-10-buc-46-cm.jpg\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/fire-cu-clips-crocodil-10-buc-46-cm.jpg 603w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/fire-cu-clips-crocodil-10-buc-46-cm-300x234.jpg 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/fire-cu-clips-crocodil-10-buc-46-cm-15x12.jpg 15w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/ro\/electronica\/249-fire-cu-clips-crocodil-10-buc-46-cm.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">2M2 resistor<\/td><td class=\"has-text-align-center\" data-align=\"center\">8<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"105\" class=\"wp-image-11810\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R.png\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R.png 453w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R-300x209.png 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R-18x12.png 18w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R-392x272.png 392w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R-130x90.png 130w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">0.5W &#8211; 8ohm Speaker<\/td><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"141\" class=\"wp-image-12099\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/speaker.png\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/speaker.png 523w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/speaker-300x282.png 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/speaker-13x12.png 13w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/ro\/electronica\/728-difuzor-36mm-05w-8ohm.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">100R resistor for speaker<\/td><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"105\" class=\"wp-image-11810\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R.png\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R.png 453w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R-300x209.png 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R-18x12.png 18w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R-392x272.png 392w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/11\/R-130x90.png 130w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/ro\/electronica\/211-rezistenta-14w-1-buc.html?search_query=rezistor&amp;results=45#\/80-valoare_rezistenta-100r','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Jumper wires for speaker<\/td><td class=\"has-text-align-center\" data-align=\"center\">2<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" class=\"wp-image-12357\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/16662-Jumper_Wires_Premium_6in._M_M_Pack_of_2-_Red_and_Black-01.jpg\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/16662-Jumper_Wires_Premium_6in._M_M_Pack_of_2-_Red_and_Black-01.jpg 600w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/16662-Jumper_Wires_Premium_6in._M_M_Pack_of_2-_Red_and_Black-01-300x300.jpg 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/16662-Jumper_Wires_Premium_6in._M_M_Pack_of_2-_Red_and_Black-01-150x150.jpg 150w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/16662-Jumper_Wires_Premium_6in._M_M_Pack_of_2-_Red_and_Black-01-12x12.jpg 12w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/ro\/electronica\/28-65-x-jumper-wires.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Jumper wires for keys and other connections<\/td><td class=\"has-text-align-center\" data-align=\"center\">11<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" class=\"wp-image-12359\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/11026-Jumper_Wires_Standard_7in._M_M_-_30_AWG__30_Pack_-01.jpg\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/11026-Jumper_Wires_Standard_7in._M_M_-_30_AWG__30_Pack_-01.jpg 600w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/11026-Jumper_Wires_Standard_7in._M_M_-_30_AWG__30_Pack_-01-300x300.jpg 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/11026-Jumper_Wires_Standard_7in._M_M_-_30_AWG__30_Pack_-01-150x150.jpg 150w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/11026-Jumper_Wires_Standard_7in._M_M_-_30_AWG__30_Pack_-01-12x12.jpg 12w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/ro\/home\/1830-cablu-usb-tip-c-1m.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div data-post-id=\"12368\" class=\"insert-page insert-page-12368 \"><h1 class='insert-page-title'>Tools required for assembly and operation<\/h1><\/div>\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-center\" data-align=\"center\"><strong>Name <\/strong><\/th><th class=\"has-text-align-center\" data-align=\"center\"><strong>Image<\/strong><\/th><th class=\"has-text-align-center\" data-align=\"center\">Buy here<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">Soldering iron<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" class=\"wp-image-10927\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/letcon-cu-temperatura-reglabila-907-2.jpg\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/letcon-cu-temperatura-reglabila-907-2.jpg 607w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/letcon-cu-temperatura-reglabila-907-2-300x300.jpg 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/letcon-cu-temperatura-reglabila-907-2-150x150.jpg 150w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/letcon-cu-temperatura-reglabila-907-2-12x12.jpg 12w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/en\/home\/444-letcon-cu-temperatura-reglabila-907.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Solder wire<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" class=\"wp-image-10925\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/fludor-08mm-100g-1.jpg\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/fludor-08mm-100g-1.jpg 607w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/fludor-08mm-100g-1-300x300.jpg 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/fludor-08mm-100g-1-150x150.jpg 150w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/fludor-08mm-100g-1-12x12.jpg 12w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/en\/home\/458-solder-wire-08mm-100g.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Pliers<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" class=\"wp-image-10924\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/clete-pentru-fire-3.jpg\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/clete-pentru-fire-3.jpg 607w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/clete-pentru-fire-3-300x300.jpg 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/clete-pentru-fire-3-150x150.jpg 150w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/07\/clete-pentru-fire-3-12x12.jpg 12w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/electronica\/260-clete-pentru-fire.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Wire stripper<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" class=\"wp-image-12083\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/clete-pentru-desizolat-fire.jpg\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/clete-pentru-desizolat-fire.jpg 900w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/clete-pentru-desizolat-fire-300x300.jpg 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/clete-pentru-desizolat-fire-150x150.jpg 150w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/clete-pentru-desizolat-fire-768x768.jpg 768w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/clete-pentru-desizolat-fire-12x12.jpg 12w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><button onclick=\"window.open('https:\/\/ardushop.ro\/electronica\/311-clete-pentru-desizolat-fire.html','_blank')\">\ud83d\uded2 Buy<\/button><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">5V USB-C power supply<\/td><td class=\"has-text-align-center\" data-align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" class=\"wp-image-12360\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/40-4301.jpg\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/40-4301.jpg 2000w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/40-4301-300x300.jpg 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/40-4301-1024x1024.jpg 1024w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/40-4301-150x150.jpg 150w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/40-4301-768x768.jpg 768w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/40-4301-1536x1536.jpg 1536w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/40-4301-12x12.jpg 12w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><br>+<br><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"127\" class=\"wp-image-11631\" style=\"width: 150px;\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/sursa-alimentare-5v-1a.jpg\" alt=\"\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/sursa-alimentare-5v-1a.jpg 632w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/sursa-alimentare-5v-1a-300x253.jpg 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2023\/10\/sursa-alimentare-5v-1a-14x12.jpg 14w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/td><td class=\"has-text-align-center\" data-align=\"center\"><br><button onclick=\"window.open('https:\/\/ardushop.ro\/ro\/electronica\/28-65-x-jumper-wires.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><br><br><br><br><br><br><button onclick=\"window.open('https:\/\/ardushop.ro\/ro\/home\/432-sursa-alimentare-5v-3a.html','_blank')\" style=\"\">\ud83d\uded2 Buy<\/button><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<div data-post-id=\"11979\" class=\"insert-page insert-page-11979 \"><h1 class='insert-page-title'>Schematic<\/h1><\/div>\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1003\" height=\"1024\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/aacb1460-d7d6-4efe-a15b-fcd7792f3465-1003x1024.jpg\" alt=\"\" class=\"wp-image-12383\" style=\"width:1140px;height:auto\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/aacb1460-d7d6-4efe-a15b-fcd7792f3465-1003x1024.jpg 1003w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/aacb1460-d7d6-4efe-a15b-fcd7792f3465-294x300.jpg 294w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/aacb1460-d7d6-4efe-a15b-fcd7792f3465-768x784.jpg 768w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/aacb1460-d7d6-4efe-a15b-fcd7792f3465-12x12.jpg 12w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/aacb1460-d7d6-4efe-a15b-fcd7792f3465.jpg 1050w\" sizes=\"auto, (max-width: 1003px) 100vw, 1003px\" \/><\/figure>\n\n\n\n<p>In this circuit, you can observe the microcontroller&#8217;s D2 to D9 pins connected to 5V supply trough a resistor, and to the ground trought S1-S8 buttons. When the buttons aren&#8217;t pushed, the pins read 5V, High. Once you push the buttons, the pins are connected to the ground, so they&#8217;ll read 0V, Low.<br>Dependening on the button you push, the corresponing pin will be High. In the Code section bellow you&#8217;ll see the corresponing note for each pin and how the note is sent to the speaker.<\/p>\n\n\n\n<p><\/p>\n\n\n<div data-post-id=\"12636\" class=\"insert-page insert-page-12636 \"><h1 class='insert-page-title'>Breadboard circuit<\/h1><\/div>\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"910\" src=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/BANANA-PIANO_all_noapple_noRvalue_GS_fingers-1024x910.png\" alt=\"\" class=\"wp-image-12376\" style=\"width:1130px;height:auto\" srcset=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/BANANA-PIANO_all_noapple_noRvalue_GS_fingers-1024x910.png 1024w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/BANANA-PIANO_all_noapple_noRvalue_GS_fingers-300x267.png 300w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/BANANA-PIANO_all_noapple_noRvalue_GS_fingers-768x683.png 768w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/BANANA-PIANO_all_noapple_noRvalue_GS_fingers-1536x1365.png 1536w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/BANANA-PIANO_all_noapple_noRvalue_GS_fingers-2048x1820.png 2048w, https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/08\/BANANA-PIANO_all_noapple_noRvalue_GS_fingers-14x12.png 14w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Once you touch the ground cable (blue) and the desired banana, you act as a button, you close the circuit through your body, from the microcontroller&#8217;s pin to the ground.<\/p>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div data-post-id=\"12385\" class=\"insert-page insert-page-12385 \"><h1 class='insert-page-title'>Arduino code<\/h1><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p><strong>pitches.h <\/strong>from Arduino IDE code examples<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<div class=\"wp-block-file alignright\"><a href=\"https:\/\/learn.groundstudio.eu\/wp-content\/uploads\/2024\/10\/pitches-2.h\" class=\"wp-block-file__button wp-element-button\" download><i class=\"fa-solid fa-download\"><\/i> Download<\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<script src=\"https:\/\/kit.fontawesome.com\/963d46ab7c.js\" crossorigin=\"anonymous\"><\/script><pre class=\"green_code_block\"><code>\/*************************************************\n * Public Constants\n  *************************************************\/\n\n#define NOTE_B0  31\n#define NOTE_C1  33\n#define NOTE_CS1 35\n#define NOTE_D1  37\n#define NOTE_DS1 39\n#define NOTE_E1  41\n#define NOTE_F1  44\n#define NOTE_FS1 46\n#define NOTE_G1  49\n#define NOTE_GS1 52\n#define NOTE_A1  55\n#define NOTE_AS1 58\n#define NOTE_B1  62\n#define NOTE_C2  65\n#define NOTE_CS2 69\n#define NOTE_D2  73\n#define NOTE_DS2 78\n#define NOTE_E2  82\n#define NOTE_F2  87\n#define NOTE_FS2 93\n#define NOTE_G2  98\n#define NOTE_GS2 104\n#define NOTE_A2  110\n#define NOTE_AS2 117\n#define NOTE_B2  123\n#define NOTE_C3  131\n#define NOTE_CS3 139\n#define NOTE_D3  147\n#define NOTE_DS3 156\n#define NOTE_E3  165\n#define NOTE_F3  175\n#define NOTE_FS3  185\n#define NOTE_G3  196\n#define NOTE_GS3 208\n#define NOTE_A3  220\n#define NOTE_AS3 233\n#define NOTE_B3  247\n#define NOTE_C4  262\n#define NOTE_CS4  277\n#define NOTE_D4  294\n#define NOTE_DS4 311\n#define NOTE_E4  330\n#define NOTE_F4  349\n#define NOTE_FS4 370\n#define NOTE_G4  392\n#define NOTE_GS4  415\n#define NOTE_A4  440\n#define NOTE_AS4 466\n#define NOTE_B4  494\n#define NOTE_C5  523\n#define NOTE_CS5 554\n#define NOTE_D5  587\n#define NOTE_DS5  622\n#define NOTE_E5  659\n#define NOTE_F5  698\n#define NOTE_FS5 740\n#define NOTE_G5  784\n#define NOTE_GS5 831\n#define NOTE_A5  880\n#define NOTE_AS5  932\n#define NOTE_B5  988\n#define NOTE_C6  1047\n#define NOTE_CS6 1109\n#define NOTE_D6  1175\n#define NOTE_DS6 1245\n#define NOTE_E6  1319\n#define NOTE_F6  1397\n#define NOTE_FS6 1480\n#define NOTE_G6  1568\n#define NOTE_GS6 1661\n#define NOTE_A6  1760\n#define NOTE_AS6 1865\n#define NOTE_B6  1976\n#define NOTE_C7  2093\n#define NOTE_CS7 2217\n#define NOTE_D7  2349\n#define NOTE_DS7 2489\n#define NOTE_E7  2637\n#define NOTE_F7  2794\n#define NOTE_FS7 2960\n#define NOTE_G7  3136\n#define NOTE_GS7 3322\n#define NOTE_A7  3520\n#define NOTE_AS7 3729\n#define NOTE_B7  3951\n#define NOTE_C8  4186\n#define NOTE_CS8 4435\n#define NOTE_D8  4699\n#define NOTE_DS8 4978<\/code><\/pre><\/pre>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-a5331a9e wp-block-columns-is-layout-flex\" style=\"padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.67%\">\n<p><strong>BananaPiano.ino\n<\/strong>This is the main program to drive the banana piano. It uses pitches.h.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><\/div>\n<\/div>\n\n\n\n<script src=\"https:\/\/kit.fontawesome.com\/963d46ab7c.js\" crossorigin=\"anonymous\"><\/script><pre class=\"green_code_block\"><code>#include \"pitches.h\"\n\nint numKeys = 8;\nint digInput[] = {  2, 3, 4, 5, 6, 7, 8, 9 };\nint myNote[] = { NOTE_C4, NOTE_D4, NOTE_E4, NOTE_F4,  NOTE_G4, NOTE_A4, NOTE_B4, NOTE_C5 };\nint toneOut = 12;\n\nvoid setup() {\n  \/\/ Start serial connection\n  Serial.begin(9600);\n  \/\/ Configure digital  input pins\n  for (int i = 0; i < numKeys; i++) {\n    pinMode(digInput[i],  INPUT);\n  }\n  pinMode(toneOut, OUTPUT);\n}\n\nvoid loop() {\n  \/\/\n  int keypressed = 0;\n  for (int j = 0; j < numKeys; j++) {\n    int sensorVal  = digitalRead(digInput[j]);\n    String outStr = String(\"K\");\n      outStr  = String(outStr + j);\n      outStr = String(outStr + \": \");\n      outStr  = String(outStr + sensorVal);\n    if (sensorVal == LOW) {\n      ++keypressed;  \/\/ increment keypressed\n      digitalWrite(13, HIGH);\n      tone(toneOut,  myNote[j]);\n    }\n    \/\/outStr = String(outStr + \":\");\n    \/\/outStr =  String(outStr + keypressed);\n    Serial.print(outStr);\n    Serial.print(\"\\\t\");\n  }\n  Serial.println(\"\");\n  if (keypressed == 0) {\n    noTone(toneOut);\n  }\n  delay(250);\n}<\/code><\/pre>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This fun and creative project turns bananas into a musical instrument using an Arduino type development board.<\/p>\n","protected":false},"author":2,"featured_media":12679,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_layout":"no_sidebar_content_centered","footnotes":""},"categories":[17],"tags":[],"class_list":["post-12336","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects"],"_links":{"self":[{"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/posts\/12336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/comments?post=12336"}],"version-history":[{"count":179,"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/posts\/12336\/revisions"}],"predecessor-version":[{"id":12965,"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/posts\/12336\/revisions\/12965"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/media\/12679"}],"wp:attachment":[{"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/media?parent=12336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/categories?post=12336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learn.groundstudio.eu\/en\/wp-json\/wp\/v2\/tags?post=12336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}