Punch Through
Published © MIT

Tiny CapSense Ukulele

Interested in making a tiny insrument? This tutorial shows you how to build a tiny ukulele!

IntermediateFull instructions provided1,977
Tiny CapSense Ukulele

Things used in this project

Hardware components

LightBlue Bean
Punch Through LightBlue Bean
×1
1M ohm resistor
×4
Resistor 1k ohm
Resistor 1k ohm
×1
piezo buzzer
×1
Solid wire
×1
1/4” plywood
×1
tiny screw
×2
Wood glue
×1
Heat shrink tubing
×1

Software apps and online services

Punch Through bean loader
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Laser cutter (generic)
Laser cutter (generic)
Soldering iron (generic)
Soldering iron (generic)
Pliers
Wire stripper
Small brush

Story

Read more

Custom parts and enclosures

Ukulele

Code

Code

Plain text
#include <CapacitiveSensor.h>

#define COMMON_PIN5
#define BUZZER_PIN4
#define THRESHOLD100
#define NUM_OF_STRINGS 4

#define CS(Y) CapacitiveSensor(COMMON_PIN, Y)

CapacitiveSensor strings[] = {CS(0), CS(1), CS(2), CS(3)};

int notes[] = {587, 392, 494, 659};

void setup() {
  for (int i = 0; i < NUM_OF_STRINGS; i++) {
  strings[i].set_CS_AutocaL_Millis(0xFFFFFFFF);
  }
  pinMode(BUZZER_PIN, OUTPUT);
}

void loop() {
  for (int i = 0; i < NUM_OF_STRINGS; ++i) {
    if (strings[i].capacitiveSensor(10) > THRESHOLD) {
    tone(BUZZER_PIN, notes[i]);
    delay(100);
    noTone(BUZZER_PIN);
    }
  }
  Bean.sleep(100);
}

Github

https://github.com/PunchThrough/ukulele

Credits

Punch Through

Punch Through

16 projects • 41 followers
We’ve been building connected products since 2009. Our diverse team has expertise in every layer from hardware to software to web.

Comments