Пример #1
0
 def lightTagHandler(v, t, a):
     if v:
         flash.on()
     else:
         try:
             flash.off()
         except Exception as e:
             print(e)
         flash.release()
Пример #2
0
 def turn_off(self):
     flash.off()
Пример #3
0
import kivy
from plyer import flash, vibrator
from time import sleep

from MorseCode import *

flashTime = 0.2

mes = "hello world"

signal = toSignal(encode(mes))

print(signal)

for char in signal:
    if char == "1":
        flash.on()
        vibrator.vibrate(time=flashTime)
    elif char == "0":
        flash.off()

    sleep(flashTime)

flash.off()