Method: Ws2812::Basic#set

Defined in:
lib/ws2812/basic.rb

#set(index, r, g, b) ⇒ Object

Set given pixel identified by index to r, g, b

See []= for a method that takes Color instance instead of individual components



133
134
135
136
# File 'lib/ws2812/basic.rb', line 133

def set(index, r, g, b)
  check_index(index)
  self[index] = Color.new(r, g, b)
end