phyphox Forums

Full Version: Matlab connection - GET Syntax
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Phyphoxer

I use Phyphox in my physicx-Class. Since i grew up with Matlab, i would like to connect PhyPhox with matlab. 
The remote interface is working fine, the communication can't be very hard since matlab has functions for JSON. I have no experience with that protocol, hence i have problems understanding the syntax of the GET? command.
In the WIKI there is a example 
/get?abc
I just want to poll the lates sensordata for e.g. acceleration sensor. I don't understand what "abc" means and how to change the syntax to address the buffer for the accelleration sensors.

Thank you for your Help

@ Sebastian: thank you for your excellent presentation last week in Esslingen
The "abc" is the name of the buffer that you want to read. I am planning a method to get a list of available buffers, but right now you have to look into the experiment configuration to find the names for each experiment. So, for example for the accelerometer, you can find (https://github.com/Staacks/phyphox-exper...yphox#L229) that there are the buffers "accX", "accY", "accZ", "acc" and "acc_time", which are x, y and z of the accelerometer as well as the absolute value and the timestamps to each sensor event.

/get?accX
should give you the last x value of the accelerometer

/get?accY=full&acc_time=full
should give you the all y values and the coresponding times

/get?acc_time=10
should give you all times after the first entry that exceeds 10 (in this case all times after 10 seconds)

/get?acc_time=10&acc=10|acc_time
should give you all times after the first entry that exceeds 10 (in this case all times after 10 seconds) as well as all absolute acceleration values coresponding to timestamps larger than 10 seconds (the "|" means that the given threshold is applied to a different buffer, in this case acc_time).