I need to send some integer value to EV3 to be consume in EV3 program. However I can only send text but not Number type data.
Below code can be used to send Text to EV3. But the EV3 program doesn’t support convert data from Text to Number, this code doesn’t reach my target.
string input = Console.ReadLine();
ev3.Mailbox.Send(“mailbox1”, input, false);
I am not sure whether the another override of Send works. But at least below code does not work.
byte[] intBytes = BitConverter.GetBytes(123);
Array.Reverse(intBytes);
byte[] result = intBytes;
ev3.Mailbox.Send(“ScreenWidthPixel”, intBytes, false);
Attached image is my sample EV3 program.
Please share your advice. Thanks.
Attachments:
You must be
logged in to view attached files.
Follow