This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

MATLAB Integration
I am trying to use MATLAB to pull data from phyphox. I am trying to access this data every 20 seconds and to write over the previously stored data each time. This is the code that I wrote. When I run the code, it works, but the data that is collected is the same each time, which leads me to believe that I am not pulling the correct information. Am I using the wrong key words to get the information?

% remote access address
phyphox_address_home = 'IP';

% starts data collection in phyphox
start = webread('IP/control?cmd=start');

% initial data pull
address = sprintf('%sexport?format=0/get?gyr_time=0&gyrX|gyr_time&gyrY|gyr_time&gyrZ|gyr_time',phyphox_address_home);
GyroscopeData = webread(address)

% waits 5 seconds, then pulls data again

% pulls data every 20 seconds, writes over previous data
for i = 1:10
    time = 20*i;
    address = sprintf('%sexport?format=0/get?gyr_time=%d&gyrX|gyr_time&gyrY|gyr_time&gyrZ|gyr_time',phyphox_address_home,time);
    GyroscopeData = webread(address)

% stops phyphox
stop = webread('IP/control?cmd=stop');

Messages In This Thread
MATLAB Integration - by ags1105 - 04-29-2020, 11:18 PM
RE: MATLAB Integration - by Sebastian Staacks - 04-30-2020, 08:40 PM

Forum Jump: