I use Erlang to control the robot.
I count the value of the read sensor in program C and want to send these sensor values (several sensor values) to the Erlang program , where I can perform calculations and control the robot. In the program given in Erlang's book, we can send several arguments, but we get only one argument as the result. to send programs X and Y to C:
Port ! {self(), {command, [50,X,Y]}}
As a result:
{Port,{data, Data}} ->
we received only one argument Data (buff [0]).
Is there a way to get multiple arguments in an Erlang program, for example, buff [0], buff [1], buff [2] ... etc. please suggest me some way to achieve this ...
source share