Pages: 1 [2]   Go Down
Author Topic: I2C communication between arduino and uvga  (Read 1446 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok, i try this tomorrow.

you can explain me how to send multiple data by serial?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49080
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
you can explain me how to send multiple data by serial?
Code:
Serial.print("This");
Serial.print("is");
Serial.print("how");
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

if i do this i recover just the first value on the uvga
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49080
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
if i do this i recover just the first value on the uvga
What is that value? "This" or "Thisishow"?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

when i say value i want to say numeric value, i don't try char ascii
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49080
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can do the same thing with numeric values.
int a=13, b=4572, c=-14;
Code:
Serial.print(a);
Serial.print(" ");
Serial.print(b);
Serial.print(" ");
Serial.print(c);

or
Code:
Serial.write(a);
Serial.write(b);
Serial.write(c);

Keep in mind that write()ing non-byte sized variables will result in multiple bytes being sent, and you must reassemble them in the correct order.
Logged

Pages: 1 [2]   Go Up
Jump to: