I have a PiFace on a RaspberryPi, and it works great, but there is a several second delay between when the input switches to when the script responds. Can someone tell me where to find/change this delay time? Thanks, Jim
I have a PiFace on a RaspberryPi, and it works great, but there is a several second delay between when the input switches to when the script responds. Can someone tell me where to find/change this delay time? Thanks, Jim
How are you talking to the PiFACE? I'm using C++ and the effect is almost instant.
Here is my code: SCPI on a Linux Board - Part 2b: PiFace Digital C++ programming
Edit: here's an example that supports interrupts to react real time on input changes: https://github.com/piface/libpifacedigital/blob/master/example.c
I'm using a Python script to run a simple routine when an input triggers, but the delay that I don't want, makes it not work for what I need it to do. I'm not very good at this programming, but I don't see anything that would cause it to have this lag. Thanks, Jim McNamee
I'm using a Python script to run a simple routine when an input triggers, but the delay that I don't want, makes it not work for what I need it to do. I'm not very good at this programming, but I don't see anything that would cause it to have this lag. Thanks, Jim McNamee
Ah. I have no experience with Python script.
I have noticed a small delay when using Python, particularly when performing serial communications. I presumed it was primarily due to running an interpreter instead of actual machine instructions, but I never did that investigation. I use Python for determining if an procedure or algorithm will provide me with what I want, because it is well structured enough and the write-run-test loop is very quick. Almost always, after I get things the way I want, I switch over to C to get performance levels up. What's fun is in many cases it only requires putting semi colons on the end of the lines.
Jack