DigitalInputArray

Read data from Robotino's digital input connectors

Contents

Syntax

r = DigitalInputArray( IPADDRESS )

Description

r = DigitalInputArray( IPADDRESS ) returns an array of floats representing voltages read at Robotino's analog input connectors.

Example Usage

r = DigitalInputArray( '192.168.0.1' )

ain1 = r(1)

Code

function [ value ] = DigitalInputArray( IPADDRESS )
url = sprintf('http://%s/data/digitalinputarray',IPADDRESS);
try
  value = webread(url);
catch ME
  sprintf('Read from %s failed with error %s',url,ME.identifier)
  value = zeros(8,1);
end
end