<commit_before><!doctype html>
<html lang="en-US">
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" href="../../../support/css/physcomp.css" />
    <title>Exercise: WS2801 RGB LED SPI Module</title>
  </head>
  <body>
    <h2>Exercise: WS2801 RGB LED SPI Module</h2>
<h4>Objective</h4>
 
    <p>Communicate digital data between an Arduino and a WS2801 LED RGB module using an SPI bus.</p>

    <p>Please be sure to review the general information about I<sup>2</sup>C and
      SPI in exercise 1.b.iv.1 prior to starting this one.</p>

    <p>This exercise will use a
      <a href="http://www.bestlightingbuy.com/12v-ws2801-digital-intelligent-led-strip.html">RGB
	LED strip module</a> based on
	the <a href="http://www.adafruit.com/datasheets/WS2801.pdf">WS2801
	constant current LED driver</a>, also available in
	a <a href="http://www.adafruit.com/search?q=ws2801&amp;b=1">variety of other
	form factors</a>.</p>

    <p>These modules accept a 24-bit color value over an SPI bus, then begin to
      relay any additional bits to the downstream SPI connection.  This allows
      daisy-chaining many RGB LEDs into an individually addressable array of
      pixels.  Once a short pause occurs in the input data, the received values
      are transferred to the internal PWM generator.  This allows simultanous
      update of the whole chain for clean animation.</p>

    <h4>Steps and observations</h4>
    <ol>
      <li>Download or find the complete <code>WS2801_test</code> sketch included with the exercise.
	If you have cloned the course materials from github, it will be in the same folder as this page, or it can be
	<a href="WS2801_test/WS2801_test.ino">
	  downloaded directly</a>.

      </li><li>Plug the RGB module into a breadboard and use solid wire to make the
	following three connections from the Arduino to the module. Note
	carefully that this module uses 12V; be very careful to keep the 12V wiring away from the Arduino:
	<ol>
	  <li> PIN11 (MOSI)  -&gt;  DAT </li>
	  <li> PIN13 (SCK)   -&gt;  CLK </li><commit_msg>Replacing obsolete exercise reference with current name and URL.<commit_after><!doctype html>
<html lang="en-US">
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" href="../../../support/css/physcomp.css" />
    <title>Exercise: WS2801 RGB LED SPI Module</title>
  </head>
  <body>
    <h2>Exercise: WS2801 RGB LED SPI Module</h2>
<h4>Objective</h4>
 
    <p>Communicate digital data between an Arduino and a WS2801 LED RGB module using an SPI bus.</p>

    <p>Please be sure to review the general information about I<sup>2</sup>C and
      SPI in the <a href="../Adafruit-PWM-I2C/index.html">Adafruit PWM I2C
      Module</a> exercise prior to starting this one.</p>

    <p>This exercise will use a
      <a href="http://www.bestlightingbuy.com/12v-ws2801-digital-intelligent-led-strip.html">RGB
	LED strip module</a> based on
	the <a href="http://www.adafruit.com/datasheets/WS2801.pdf">WS2801
	constant current LED driver</a>, also available in
	a <a href="http://www.adafruit.com/search?q=ws2801&amp;b=1">variety of other
	form factors</a>.</p>

    <p>These modules accept a 24-bit color value over an SPI bus, then begin to
      relay any additional bits to the downstream SPI connection.  This allows
      daisy-chaining many RGB LEDs into an individually addressable array of
      pixels.  Once a short pause occurs in the input data, the received values
      are transferred to the internal PWM generator.  This allows simultanous
      update of the whole chain for clean animation.</p>

    <h4>Steps and observations</h4>
    <ol>
      <li>Download or find the complete <code>WS2801_test</code> sketch included with the exercise.
	If you have cloned the course materials from github, it will be in the same folder as this page, or it can be
	<a href="WS2801_test/WS2801_test.ino">
	  downloaded directly</a>.

      </li><li>Plug the RGB module into a breadboard and use solid wire to make the
	following three connections from the Arduino to the module. Note
	carefully that this module uses 12V; be very careful to keep the 12V wiring away from the Arduino:
	<ol>
	  <li> PIN11 (MOSI)  -&gt;  DAT </li>
	  <li> PIN13 (SCK)   -&gt;  CLK </li>
{'fraction_non_alphanumeric': 0.10673234811165845, 'fraction_numerical': 0.029556650246305417, 'mean_word_length': 3.450939457202505, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 93, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7048391', 'n_tokens_mistral': 1481, 'n_tokens_neox': 1337, 'n_words': 520}