예제 #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()))
예제 #4
0
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()))