phyphox Forums
Help with button - Printable Version

+- phyphox Forums (https://phyphox.org/forums)
+-- Forum: Discussion (https://phyphox.org/forums/forumdisplay.php?fid=1)
+--- Forum: Experiments and Ideas (https://phyphox.org/forums/forumdisplay.php?fid=4)
+--- Thread: Help with button (/showthread.php?tid=1516)



Help with button - d.girardi - 02-11-2022

I´m creating a refraction experiment and need to measure the smartphone angle based on the accelerometer values.  I add two buttons to the screen, one to record the incident angle and the other to the refracted angle. 
I tried this approach:
Phyphox_Analysis

But the data does not persist in the graph. 
Does anyone know how can I fix this?


RE: Help with button - Jens Noriʇzsɔɥ - 02-11-2022

Could you share the .phyphox file? There is happening quite a lot behind the scenes, for instance, the effect of the “clear” attribute on writing to buffers: “true” erases the previous data…


RE: Help with button - d.girardi - 02-11-2022

That's the phyphox file:
Refracao.phyphox


RE: Help with button - Jens Noriʇzsɔɥ - 02-11-2022

You apparently never clear the Action buffers so data is written into output on each run of the analysis block. After some time it is simply full and the data gets pushed out. This gets even worse as the analysis block does not pause…