Difference between revisions of "Matlab rest"

From RobotinoWiki
m (add prerequisites)
m (Link to examples)
 
Line 9: Line 9:
 
* Install Matlab on your Computer
 
* Install Matlab on your Computer
 
* Connect to your Robotino network
 
* Connect to your Robotino network
* Enter Robotino's IP in your web browser () or access the data in your Matlab skript.
+
* Enter Robotino's IP with the commands in your web browser or access the data in your Matlab skript like in the example below.
  
  
==Installation==
+
==Access==
See the examples below. But you might want to use the m-files from our [https://doc.openrobotino.org/download/RobotinoMatlab/REST/ REST-Toolbox].
+
See the examples below. But you might want to use the m-files from our [https://doc.openrobotino.org/download/RobotinoMatlab/REST/ REST-Toolbox]. You can use the GET and PUT or POST Methods to get and set values from the robotino's sensors or actuators.
 +
 
 
==Example==
 
==Example==
 
<pre>
 
<pre>
Line 26: Line 27:
 
imshow(img)
 
imshow(img)
 
</pre>
 
</pre>
 +
 +
For more examples go to [[Rest_api|REST-API]].

Latest revision as of 14:53, 12 September 2019

Introduction

Robotino matlab icon 64.png This page describes how to access Robotino's sensors and actors from Matlab by making use of Robotino's REST-API.

Prerequisites

  • Install Matlab on your Computer
  • Connect to your Robotino network
  • Enter Robotino's IP with the commands in your web browser or access the data in your Matlab skript like in the example below.


Access

See the examples below. But you might want to use the m-files from our REST-Toolbox. You can use the GET and PUT or POST Methods to get and set values from the robotino's sensors or actuators.

Example

//Read the value of Robotino's bumper
webread('http://192.168.0.1/data/bumper')

//Drive Robotino forward with 1m/s
webwrite('http://192.168.0.1/data/omnidrive',[1 0 0])

//Get image from Robotino's camera
img=webread('http://192.168.0.1/cam0')
imshow(img)

For more examples go to REST-API.