|
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)))
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.
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.
|
||||||||||||||||||||
|
Writing code. |
||||||||||||||||||||
|
(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)) |
||||||||||||||||||||



