Hit a snag with Blynk python library script not looping

Only @vshymanskyy will know if/how/why blynk.set_user_task() is only good for ONE task :stuck_out_tongue_winking_eye: seems a bit silly to me.

Meanwhile I have had some limited results with multiple threads… probably doing it wrong :smile: but it seems to do the job when testing… this is an additional counter I have running in my testing script…

import thread

# Counter Display
def counter_task(cntr):
    while cntr > 0:
        blynk.virtual_write(4,cntr)
        #print (cntr)
        cntr += 1
        time.sleep(5)

thread.start_new_thread(counter_task, (1,))

So far I have three different timing methods… reading frequency on a widget, blynk_user_task() and thread… an ungainly combination to say the least :blush:

1 Like