EasyManua.ls Logo

Seeed Grove - Beaglebone Green Python Code; Beaglebone Green Python Code Structure

Seeed Grove
29 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7/23/22, 9:41 PM
Grove - Chainable RGB LED - Seeed Wiki
https://wiki.seeedstudio.com/Grove-Chainable_RGB_LED/
20/29
Step3: Copy and paste the following code into the new tab
1 import time
2 import Adafruit_BBIO.GPIO as GPIO
3
4 CLK_PIN = "P9_22"
5 DATA_PIN = "P9_21"
6 NUMBER_OF_LEDS = 1
7
8 class ChainableLED():
9 def __init__(self, clk_pin, data_pin, number_of_led
10 self.__clk_pin = clk_pin
11 self.__data_pin = data_pin
12 self.__number_of_leds = number_of_leds
13
14 GPIO.setup(self.__clk_pin, GPIO.OUT)
15 GPIO.setup(self.__data_pin, GPIO.OUT)
16
17 for i in range(self.__number_of_leds):
18 self.setColorRGB(i, 0, 0, 0)
19
20 def clk(self):

Other manuals for Seeed Grove

Related product manuals