1

I'm new to processing. I've made some GUI in Processing and I need to send some bytes to another MCU via Serial port to control LEDs. I need to send this code A0 0C 01 A2.

byte on[]={0xA0, 0x0C, 0x01, 0xA2}; 
port.write(on); 
//This won't compile

How I can do that?

1 Answer 1

0

You're on the right track, just need to use the Processing syntax (not the Arduino one) for the byte array:

byte[] on = {(byte)0xA0, (byte)0x0C, (byte)0x01, (byte)0xA2};
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.