Question

Scenario: If I send a digital signal, can i trigger a serial.write to another mcu

void loop(){

int state = digitalRead(button);

if (state == HIGH){
serial.write((byte)0xF5);
serial.write((byte)0xF5);
delay(10000);
}

Can it really happen?

Why not ?

Yes, but you have to spell “Serial” correctly, have the correct number of braces, declare “button” before it will compile.
“button” will be an input by default, but a pinMode wouldn’t go amiss.

Code tags would be good too. I do believe you’ve been asked before to do that.

papyrus12:
Can it really happen?

Does it compile?
Does it run?
Does it do what you want?
Is this a hypothetical question?

Read this before posting a programming question

Point 6: "Make an informative subject description, not "help me, I'm a noob", nor something in all capitals. "


Your subject: Question

My response: Answer

You've done this before haven't you?

You post code that doesn't compile, not in code tags, and don't get the capitalization right.

You'll get a better response if you following the posting guidelines I linked to above.

Yeah, I already did this before several times, like two times already because I really wanna learn this arduino thing, because in our country the arduino is very thready topic for engineers yet thank you for your response.

papyrus12:
Yeah, I already did this before several times, like two times already because I really wanna learn this arduino thing, because in our country the arduino is very thready topic for engineers yet thank you for your response.

And yet you are still ignoring the feedback being given to you. You are not asking your questions in a way likely to get useful responses. All you're doing here is wasting people's time.