Go Down

Topic: How to pass Multi_byte values between two Arduinos (Read 984 times) previous topic - next topic


Using one Arduino connected with a potentiometer, and the other one connected with an LED, read pin(A0) to get the analog result and pass the Multi-byte values to Arduino_B to control the brightness, how to do this?



Assuming that the LED is on a PWM pin, then there's no need to pass multibyte values - the PWM value will be a single byte.

Are you asking how you would physically connect the two boards, or how to pick apart an "int" and re-assemble it at the receiver?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


how to pick apart an "int" and re-assemble it at the receiver


You could use a union on each side.  Convert the int to a byte array on the send side, then convert that array back on the receive side.

This post (and the replies that follow) should get you there.  They're converting floats, but it will work with ints as well.  http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1207242838


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131