Modify led
This commit is contained in:
parent
f14021b98a
commit
edefa7fc1b
@ -13,7 +13,7 @@ LED_CHANNEL = 0 # set to '1' for GPIOs 13, 19, 41, 45 or 53
|
||||
class Led:
|
||||
def __init__(self):
|
||||
#Control the sending order of color data
|
||||
self.ORDER = "GRB"
|
||||
self.ORDER = "RGB"
|
||||
# Create NeoPixel object with appropriate configuration.
|
||||
self.strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL)
|
||||
# Intialize the library (must be called once before other functions).
|
||||
|
@ -129,6 +129,7 @@ class Server:
|
||||
pass
|
||||
|
||||
def readdata(self):
|
||||
try:
|
||||
try:
|
||||
self.connection1,self.client_address1 = self.server_socket1.accept()
|
||||
print ("Client connection successful !")
|
||||
@ -143,6 +144,7 @@ class Server:
|
||||
if self.tcp_Flag:
|
||||
self.Reset()
|
||||
break
|
||||
print(AllData)
|
||||
if len(AllData) < 5:
|
||||
restCmd=AllData
|
||||
if restCmd=='' and self.tcp_Flag:
|
||||
@ -256,6 +258,8 @@ class Server:
|
||||
self.send(cmd.CMD_POWER+'#'+str(ADC_Power)+'\n')
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
print(e)
|
||||
self.StopTcpServer()
|
||||
def sendUltrasonic(self):
|
||||
if self.sonic==True:
|
||||
|
BIN
Tutorial.pdf
BIN
Tutorial.pdf
Binary file not shown.
Loading…
Reference in New Issue
Block a user