62
class
LED:
def
__init__(self):
self.LED_COUNT
Raspberry Pi
self.LED_PIN
self.LED_FREQ_HZ
self.LED_DMA
self.LED_BRIGHTNESS =
self.LED_INVERT
self.LED_CHANNEL
#
Use the configuration item above to create a strip
self.strip = Adafruit_NeoPixel(
self.LED_COUNT,
self.LED_PIN,
self.LED_FREQ_HZ,
self.LED_DMA,
self.LED_INVERT,
self.LED_BRIGHTNESS,
self.LED_CHANNEL
)
self.strip.begin()
def
colorWipe(self, R, G, B):
color = Color(R, G, B)
for
i
in
range(self.strip.numPixels()):
self.strip.setPixelColor(i, color)
self.strip.show()
=
16
#
Set to the total number of LED lights on the robot product.There are more LED lights on the
=
12
#
Set to the input pin number of the LED group
=
800000
=
10
255
=
False
=
0
#
This function is used to change the color of the LED light
#
Only one LED light color can be set at a time, so we need to do a loop
#
The color will only change after calling the show method
Need help?
Do you have a question about the AWR Adeept Wheeled Robot and is the answer not in the manual?