user21230: I am trying to control a strip of WS2801 LEDs through an arduino uno running firmata from Python on my laptop.
I've written some basic code based on adafruit's library here (from line 187): 
from pymata_aio.pymata3 import PyMata3
from pymata_aio.constants import Constants
import time

leds = [(255, 255, 0), (255, 255, 0), (0, 255, 255)]

uno = PyMata3()

uno.set_pin_mode(2, Constants.OUTPUT)  # signal
uno.set_pin_mode(3, Constants.OUTPUT)  # clock


def show(leds):
    for pixel in leds:
        for channel in pixel:
            i = 0b1
            for x in range(0,8):
                if i & channel:
                    uno.digital_write(2, 1)
                else:
                    uno.digital_write(2, 0)
                uno.digital_write(3, 1)
                uno.digital_write(3, 0)

                i = i << 1

    uno.digital_write(3, 0)
    time.sleep(0.001)

When I run the code it seems to run ok, but only the first LED will light up. I think (too quick to be certain) that it flashes through all the colours - ie displaying each colour rather than passing them through.
I'm wondering if there is something wrong with the timing for the clock pin making it latch, but I'm grasping here.

user21258: It's possible that time.sleep is causing a latching issue. You should instead use pymata-aio's sleep function:
uno.sleep(0.001)

The documentation for it can be found here: http://htmlpreview.github.io/?https://github.com/MrYsLab/pymata-aio/blob/master/documentation/html/pymata_aio.html#module-pymata_aio.pymata3
You could also try a different pin and see if you still have the issue?

21230: <p>I am trying to control a strip of WS2801 LEDs through an arduino uno running firmata from Python on my laptop.</p>

<p>I've written some basic code based on adafruit's library <a href="https://github.com/adafruit/Adafruit-WS2801-Library/blob/master/Adafruit_WS2801.cpp" rel="nofollow">here</a> (from line 187): </p>

<pre><code>from pymata_aio.pymata3 import PyMata3
from pymata_aio.constants import Constants
import time

leds = [(255, 255, 0), (255, 255, 0), (0, 255, 255)]

uno = PyMata3()

uno.set_pin_mode(2, Constants.OUTPUT)  # signal
uno.set_pin_mode(3, Constants.OUTPUT)  # clock


def show(leds):
    for pixel in leds:
        for channel in pixel:
            i = 0b1
            for x in range(0,8):
                if i &amp; channel:
                    uno.digital_write(2, 1)
                else:
                    uno.digital_write(2, 0)
                uno.digital_write(3, 1)
                uno.digital_write(3, 0)

                i = i &lt;&lt; 1

    uno.digital_write(3, 0)
    time.sleep(0.001)
</code></pre>

<p>When I run the code it seems to run ok, but only the first LED will light up. I think (too quick to be certain) that it flashes through all the colours - ie displaying each colour rather than passing them through.</p>

<p>I'm wondering if there is something wrong with the timing for the clock pin making it latch, but I'm grasping here.</p>
 21258: <p>It's possible that time.sleep is causing a latching issue. You should instead use pymata-aio's sleep function:</p>

<pre><code>uno.sleep(0.001)
</code></pre>

<p>The documentation for it can be found here: <a href="http://htmlpreview.github.io/?https://github.com/MrYsLab/pymata-aio/blob/master/documentation/html/pymata_aio.html#module-pymata_aio.pymata3" rel="nofollow">http://htmlpreview.github.io/?https://github.com/MrYsLab/pymata-aio/blob/master/documentation/html/pymata_aio.html#module-pymata_aio.pymata3</a></p>

<p>You could also try a different pin and see if you still have the issue?</p>
