Home→Forums→MonoBrick Communication Library→How to send Number to EV3 via Mailbox
This topic contains 1 reply, has 2 voices, and was last updated by Anders Søborg 4 years, 7 months ago.
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);
byte result = intBytes;
ev3.Mailbox.Send(“ScreenWidthPixel”, intBytes, false);
Attached image is my sample EV3 program.
Please share your advice. Thanks.
Why are you doing a reverse of the array?
You must be logged in to reply to this topic.