示例#1
0
 def bit2led(self, bitList, unitTime):
     for e in bitList:
         if e == '0':
             ledOnOff.off()
         elif e == '1':
             ledOnOff.on()
         sleep(unitTime)
示例#2
0
 def bit2led(self, bitList, unitTime):
     for e in bitList:
         if e == '0':
             ledOnOff.off()
         elif e == '1':
             ledOnOff.on()
         sleep(unitTime)
示例#3
0
import ledOnOff
import chargetimes
import time

ledOnOff.on()
time.sleep(0.1)
print("Detect LED 'on': " + str(chargetimes.getLed()))

ledOnOff.off()
time.sleep(0.1)
print("Detect LED 'off': " + str(not chargetimes.getLed()))
import ledOnOff
import chargetimes
import time

ledOnOff.on()
time.sleep(0.001)
print("Detect LED 'on': " + str(chargetimes.getLedResistor()))

ledOnOff.off()
time.sleep(0.001)
print("Detect LED 'off': " + str(not chargetimes.getLedResistor()))