diff --git a/Code/Server/Led.py b/Code/Server/Led.py index 47e1dc4..53ce218 100644 --- a/Code/Server/Led.py +++ b/Code/Server/Led.py @@ -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). diff --git a/Code/Server/server.py b/Code/Server/server.py index cfc1497..68be22d 100644 --- a/Code/Server/server.py +++ b/Code/Server/server.py @@ -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,7 +258,9 @@ class Server: self.send(cmd.CMD_POWER+'#'+str(ADC_Power)+'\n') except: pass - self.StopTcpServer() + except Exception as e: + print(e) + self.StopTcpServer() def sendUltrasonic(self): if self.sonic==True: ADC_Ultrasonic=self.ultrasonic.get_distance() diff --git a/Tutorial.pdf b/Tutorial.pdf index c06f830..ff58a43 100644 Binary files a/Tutorial.pdf and b/Tutorial.pdf differ