@every untill....



  • Hello!

    I recently found out about Tingbot, and this is looks awesome! I was just wondering if I could, for example, show the time untill someone pressed the left button...

    Something like this:
    @every(seconds=1.0/30) untill left_button.press

    def loop():

    currentDate = time.strftime("%d %B %Y")
    currentTime = time.strftime("%H:%M:%S")
    
    screen.fill(color='black')
    
    screen.text(currentTime, xy=(160,110), color="white", font_size=50)
    screen.text(currentDate, xy=(160, 180), color="white", font_size=24)
    

    @left_button.press
    #code I want to do when the left button is pressed

    Thanks in advance,
    EagleX21

    EDIT: Or is there like a function that can quit the @every?


Log in to reply

Looks like your connection to @every untill.... was lost, please wait while we try to reconnect.