This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorials:products:pixel36mm:index.html [2012/03/07 15:25] ladyada [Download] |
tutorials:products:pixel36mm:index.html [2016/01/28 18:05] (current) |
||
---|---|---|---|
Line 92: | Line 92: | ||
==== Code! ==== | ==== Code! ==== | ||
- | Let's look through the strandtest example code. To use the library in an Arduino sketch, you'll first need to globally declare a WS2801 object to talk to the strip. It is invoked with three variables: the number of pixels and the data and clock pins: | + | Let's look through the strandtest example code. To use the library in an Arduino sketch, you'll first need to globally declare a Adafruit_WS2801 object to talk to the strip. It is invoked with three variables: the number of pixels and the data and clock pins: |
<code C> | <code C> | ||
Line 99: | Line 99: | ||
// Set the first variable to the NUMBER of pixels. 25 = 25 pixels in a row | // Set the first variable to the NUMBER of pixels. 25 = 25 pixels in a row | ||
- | WS2801 strip = WS2801(25, dataPin, clockPin, WS2801_GRB); | + | Adafruit_WS2801 strip = Adafruit_WS2801(25, dataPin, clockPin, WS2801_GRB); |
</code> | </code> | ||