class documentation

class NeoString:

Constructor: NeoString()

View In Hierarchy

String of NeoPixels

A singleton class based on the built-in NeoPixel class. The string is a list of NeoLed objects which can be accessed by index. The NeoLed objects are used to control the individual LEDs in the string. The string is used to control the LEDs on the board.

Class Method get_instance Return the singleton instance
Method __init__ Initialise the NeoPixel string
Method set_rgb Set the RGB value of the LED
Method write Write to NeoPixel String
Class Variable _this_string Undocumented
Instance Variable _buff Undocumented
Instance Variable _num_leds Undocumented
Instance Variable _pin Undocumented
Instance Variable _sm Undocumented
@classmethod
def get_instance(cls):

Return the singleton instance

If the singleton already exists then it is returned. Otherwise it is created.

def __init__(self):

Initialise the NeoPixel string

This initialises the NeoPixel string. If the singleton already exists then an exception is raised.

def set_rgb(self, i, rgb):

Set the RGB value of the LED

This sets the RGB value of the LED.

Parameters
ithe index number of the led to set
rgbA tuple containing the RGB values. Each value should be an integer between 0 and 255.
def write(self, count=None):

Write to NeoPixel String

Update the NeoPixel string from the buffer. If count is not provided the entire string is updated.

Parameters
countthe number leds to be updated.
_this_string =

Undocumented

_buff =

Undocumented

_num_leds =

Undocumented

_pin =

Undocumented

_sm =

Undocumented