Send message to arduino with Mcreator Link

Started by Mexar on

Topic category: General discussion

Last seen on 13:50, 27. Apr 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Send message to arduino with Mcreator Link
Mon, 11/16/2020 - 16:16 (edited)

Hello there.

What I'm trying to do is a mod that makes Alexa mock at me when I do something bad in Minecraft; I saw that there is a way to send a precise custom message to Arduino using the command /link sendmessage <something>.

How do I check for these messages in Arduino ide? How does it work? (sorry but the example wasn't clear enough) Is it possible to send the same messages through procedure?

 

Edited by Mexar on Mon, 11/16/2020 - 16:16
Is it possible to send the…
Mon, 11/16/2020 - 16:19

Is it possible to send the same messages through procedure?

Yes, there is send message block.

How do I check for these messages in Arduino ide?

https://github.com/Pylo/MCreatorLinkArduino/blob/26826d0c0fce3b9cf5961b…

Last seen on 13:50, 27. Apr 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok but I don't know what to…
Mon, 11/16/2020 - 16:26

Ok but I don't know what to type in the messages to make it work:

for example when I want to make this happens : 

  if(command.equals("customCommand1")) {

    digitalWrite(LED_BUILTIN, HIGH);    

  }

I type in chat /link sendmessage customCommand1 

But it doesn't work; so what should I type? Am I doing something wrong?

Last seen on 13:50, 27. Apr 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
another thing, what do you…
Mon, 11/16/2020 - 18:33

another thing, what do you mean by format

command?data

because I think "command" refers to the "customCommand1" ; but the data? what is that?

You need to send custom…
Tue, 11/17/2020 - 15:28

You need to send custom command with data, eg. /link sendmessage customCommand1?data

Last seen on 13:50, 27. Apr 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think there is a problem;…
Tue, 11/17/2020 - 15:52

I think there is a problem; I literally type 

/link sendmessage customCommand1?data

but nothing happens on the Arduino (I made it so that when it receives the message the led builtin should blink)

Last seen on 11:05, 17. Oct 2021
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi did you find solution ?   
Sat, 09/25/2021 - 15:36

Hi did you find solution ? 

 

Last seen on 16:50, 22. Jan 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi in that line "data" is…
Sat, 01/22/2022 - 16:50

Hi in that line "data" is the message u sent

İ mean if u send /link sendmessage hello world the data is hello world "command"  is just for usage in IDE 

İf u call "command.equals" it gets the "data" and declares it as command runs the function and sets it back to zero

Last seen on 16:50, 22. Jan 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And also builtin led is…
Sat, 01/22/2022 - 16:51

And also builtin led is always active so u should turn it off first