Now it's time to secure the electronic components to your skirt and test it out.
If your skirt isn't lined, you may want to add a lining to protect your wires and fibers and make the whole thing a lot more comfortable.
Find a safe place near the waistband to sew down the LSM303 accelerometer. Don't choose any place that will get sweaty or you'll short your dress out. Between the skirt and lining is a great way to go. Orient the sensor so the arrows indicating "X" are parallel to the ground. Sew it down with the unused pads.
It's also a great idea to add a little pocket for the battery, so it doesn't pull too much on the electronic components.
Once everything is secure, spend some more time on strain relief. Tack down the wires so nothing pulls, and make sure everything is comfortable.
Put your skirt on and twirl around a bunch!
There are a few lines in the code you can change in order to change the sensitivity of the sensor.
const float twirl = 7; // accelerometer threshold for toggling modes -- change this number to change sensitivity long twirlStart = 0; long twirlTime = 2000;
The "const float twirl" variable will adjust the sensitivity. Whole numbers or decimals are OK here. Change this number until you find a sensitivity that works for you.
The "twirlTime" variable sets the duration of time between sensor checks. It's set to 2000 (2 seconds). If you find the modes double-changing before you're done with your twirl, play with this number until you find one that works for you.
Text editor powered by tinymce.