Browse Source

del print

chao 1 month ago
parent
commit
b3b10639cc
1 changed files with 6 additions and 6 deletions
  1. 6 6
      CocoPi.py

+ 6 - 6
CocoPi.py

@@ -1531,7 +1531,7 @@ class PCA9685(object):
         data[1]=int(hex((on >> 8) & 0xff),16)
         data[2]=int(hex(off & 0xff),16)
         data[3]=int(hex((off >> 8) & 0xff),16)
-        print(data)
+        # print(data)
         for i in range(0,4):
             self.write(0x06+i+index*4,data[i])
         
@@ -1550,7 +1550,7 @@ class PCA9685(object):
     def _us2duty(self,value):
         return 4095*value/self.period
         
-    def __del__():
+    def __del__(self):
         print("del pac9685")
         time.sleep(1)
         for i in range(0,16):
@@ -1667,7 +1667,7 @@ class extOutputPin(PCA9685):
     
     def pwmWrite(self,pinId,val):    #val:0~255
         self.pinId=pinId
-        print("pinid"+str(self.pin[self.pinId]))
+        # print("pinid"+str(self.pin[self.pinId]))
         self.duty(self.pin[self.pinId],val*16)
     
     def __del__(self):
@@ -1728,7 +1728,7 @@ class extGpio(MCP23017,ADS1115,extOutputPin):
                     self.setGpioDir("B",5,0)
                     self.setGpioLevel("B",5,1)
                     self.setGpioDir("B",4,0)
-                    print("a")
+                    # print("a")
                     time.sleep(1)
                 else:
                     pass
@@ -1788,7 +1788,7 @@ class extGpio(MCP23017,ADS1115,extOutputPin):
         self.address=0x20
         if pinId>=0 and pinId<=3:
             if pinId==0:
-                print("digital write level")
+                # print("digital write level")
                 self.setGpioLevel("B",3,level)
             elif pinId==1:
                 self.setGpioLevel("B",0,level)
@@ -1820,7 +1820,7 @@ class extGpio(MCP23017,ADS1115,extOutputPin):
         #a0~a3:4~7
         if pinId>=0 and pinId<=3:
             if pinId==0:
-                print("get digital write level")
+                # print("get digital write level")
                 return self.getGpioLevel("B",3)
             elif pinId==1:
                 return self.getGpioLevel("B",0)