I want to reset my counters at a certain time but how do I use clock.now()?
I tried
now=clock.now()
now =getTimestamp(self)
print(f"Current time: {now.hour}:{now.minute}:{now.second}")
But none of them works.
Anyone?
I want to reset my counters at a certain time but how do I use clock.now()?
I tried
now=clock.now()
now =getTimestamp(self)
print(f"Current time: {now.hour}:{now.minute}:{now.second}")
But none of them works.
Anyone?
Ok I understand.
Is there a way to reset the counters at a specific time every day (midnight)
gen2-people-tracker/api/script.py
counter = {'up': 0, 'down': 0, 'left': 0, 'right': 0} # Y axis (up/down), X axis (left/right)
oljo
You can reset it by sending a reset flag (buffer) from host PC to device at midnight (using Python's time or datetime modules) if you are in script node.
Example: https://docs.luxonis.com/software/depthai/examples/script_json_communication/
Thanks,
Jaka