I am using Erlang for driving robot.
I am reading sensor values in C program and want to send these sensor values(multiple sensor values) to Erlang program where I can perform computation and control robot. In progam given in Erlang book we can send multiple argument but we get back only one argument as result. for sending X and Y to C program:
Port ! {self(), {command, [50,X,Y]}}
In result:
{Port,{data, Data}} ->
we got only one argument Data(buff[0]).
Is there any way to receive multiple argument in Erlang program like buff[0], buff[1], buff[2]..and so on. please suggest me some way of achieving this...