i love to make my project alive with RevPi. I would like to ask you if my situation is just inaccurate python code or if it is insecure CPU unit behavior. My application collects data into an array and sends it to my api server once every 5 minutes. The data it collects is checked by the DI module on the leading edge. I define them with the as_thread parameter to achieve parallel addition of data to the array (the array is stored in a txt file and then wrapped in json)
this is the way how to define reg_event:
Code: Select all
self.revpi.io[id].reg_event(self.triggerEdge, edge=input, as_thread=True)
Code: Select all
thread.exit.wait(0.3)
Code: Select all
self.revpi.exitsignal.wait(2)
Example of my start method:
Code: Select all
def start(self):
time.sleep(1)
self.revpi.mainloop(blocking=False)
while not self.revpi.exitsignal.wait(sendingDataInterval):
self.prepareBatches()
CPU: Kunbus RevPi Core S 8 GB PR100359
MODULES: Kunbus RevPi DI PR100195