Send message to arduino with Mcreator Link

Started by Mexar on

Topic category: General discussion

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
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?

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?

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)

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 ? 

 

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

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