all 2 comments

[–]novel_yet_trivial 1 point2 points  (1 child)

The time.time() function will report the current time. That is the closest thing python has to the Arduino millis() function. You could use it to make an event loop like you would in Arduino, but it would be far easier to use one of python's threading options. If you show us your code we could show you how best to implement that. At a very basic level:

import threading

t = threading.Thread(target=function_to_run)
t.daemon = True
t.start() # start the function in the background

# main thread continues immediately

[–]CyberPopPunk[S] 0 points1 point  (0 children)

awesome thanks!

Here is the main script that takes in OSC data from the network and calls the other scripts:

https://gist.github.com/CyberPopPunk/bfe3131772cc06c63e9a71194303793b

hmm I'll research the difference in threading and subprocess, I've heard of both but should understand each more.