Calibration

After everything is assembled, you may find that your horn is too sensitive: you get within a few inches and the LED tip comes on.  Or it may be not sensitive enough and no amount of touching will make the horn's tip glow.  Luckily this is easy to adjust in the code.

Plug your Gemma into your computer and be sure it's selected under Tools > Port > Adafruit Gemma M0.

Open the Serial monitor and move your hands away from the Gemma.  You should see numbers scrolling by.  This is your baseline number, so write it down.

Now touch the copper tape.  This is your active number.  Write this down too.

Go find this line in the code:

int touch = 500;    // Change this variable to something between your capacitive touch serial readouts for on and off

The "touch" variable is what sets the sensitivity.  Change the number to something near the median point between your baseline number and your active number.  Upload the code again and test to see if it's behaving better.

Adding the copper tape will change the active number wildly.  The more tape you add, the greater the change, so re-calibrate when your horn is fully assembled for best results.

The sensitivity will also change in different situations.  If the Gemma is plugged into your computer, your results will be different from when it's not plugged in.  Since you can't get readouts when it's not plugged in, there will be some trial and error to get the horn calibrated just right.  

The sensitivity will also change if it's on your head, not on your head, on the headdress or not on the headdress.  Or if the wind is blowing.  It can be a little frustrating!  So be sure you're testing with the horn in its final location (on your head).  

If all else fails, ground yourself.  Take three deep breaths, wiggle your toes, and connect your chakras to the Universal Ground.  Electricity runs through us all, and frustration can change your results.  Breathe.

Then, go prance around like the Magical Sparkly Unicorn you are.

This guide was first published on Jan 26, 2018. It was last updated on Sep 21, 2018. This page (Calibration) was last updated on Jan 24, 2018.