Take your designs to the next level with sensors, music, and movement!
These sensors work only with lightboards, and not with regular LEDs.
 
 
This page discusses lightboards and sensors that have a microchip underneath. These will not work with plain LEDs.
 

 
If you have the switches that are flat underneath, see this page.
 
 
 
 

Movie credits: MechaRoboshop
 
 
 


 
Use this program with any sensor:
 
(always
  (if (> sensor 5)
    (twinkle 2)))

 
 
 
 

 
The custom sensor senses resistance, so you can connect (e.g.) resistive fabric to the two holes to make a pressure sensor. Its built in resistance is 100 kilo-ohms.


 
 
The accelerometer normally measures movement, but if you connect these two holes, it will detect 1 of 6 orientations. Tutorial coming soon.

   

With this switch, Sparkle can react to your touch. Connect the hole on the side to a patch of conductive cloth to create a larger touch pad.

 

Because sensors need to communicate with Sparkle, we have to use lightboards  instead of plain LEDs or sequins. Connect up to 20 in any color combination.

 
We wanted to keep the wiring really simple, and make it so every sensor can be used with the same exact program. As a result, lightboards and sensors each have a microchip underneath to communicate with Sparkle.
 


 
To use sensors and lightboards, first reset Sparkle.
  1. connect the plus and minus holes to a 3V battery
  2. briefly connect the reset pad to the reset hole
  3. Sparkle's center LED won't light up.

 

 
 
 
 
 
You can use one touch switch AND one sensor:        
 
(always
  (if (< sensor 2) (center 5))
  (if (touched)    (twinkle 2)))



   
 
 
 
With sensors, use the bigger battery (CR2032) with the plastic battery holder, or 2 AA in series.

 
 
 
 


Programming Sparkle with sensors and lightboards.

     
    The first way to use sensors is to have Sparkle turn on lights in response to sensor input.
    The interface has two parts: the slider on the left controls its sensitivity, and the buttons on the right tell it how to respond.  
     
     
     

    Detect a wide range, like completely dark to very bright. Detect a small range, like changes in room temperature. Set a high threshold, so Sparkle responds only when it gets really loud.


    Turn on only one light at a time.

    Turn on multiple lights, like a sound meter.

    Turn off the lights as the sensor gets louder.
     

    Light up to match the current sensor value.

    Light up briefly only when there is change in sensor value.
     


Writing code.
     
    You can also write a short programs to do different things depending on sensor input.
 
(if (> sensor 5)    ;if the sensor value is greater than 5 (between 1-10)
  (right 2))        ;fade right with speed 2

(if (< sensor 3)    ;if the sensor value is less than 3
  (right 2))        ;fade right with over 2 seconds
  (twinkle 30))     ;else twinkle randomly over 30 seconds

(if (< sensor 5)  (right 2))
(if (= sensor 5)  (right 2))
(if (even sensor) (right 2))
(if (odd  sensor) (right 2))
(if (> sensor random)  (right 2))