Send message to arduino with Mcreator Link

Started by Mexar on Mon, 11/16/2020 - 16:15

Topic category: General discussion

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • 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)