Receive data from Arduino UNO R3
hello:
arduino uno r3 connect via usb. have simple fact input code works.
i intend connect 16x2 lcd display i'll settle view data in "serial monitor" in arduino ide 1.0.5.
i made small application in c # send data arduino. 3 variables. distinguish each, first send byte 'a', behind him decimal numeric values ??shown thereupon send 'b' other numerical data execute code in b above , same 'c' .
if send secuantia c #:
in serial monitor shows this:
should appear:
how capture data in each corresponding numbers if?
i hope have explained well.
a greeting.
arduino uno r3 connect via usb. have simple fact input code works.
code: [select]
byte datos;
void setup()
{
serial.begin(9600);
}
void loop() {
if (serial.available())
{
datos = serial.read();
if (datos == 'a')
{
serial.println("vida: ha llegado variable a: ");
}
if (datos == 'b')
{
serial.println("balas: ha llegado variable b: ");
}
if (datos == 'c')
{
serial.println("mana: ha llegado variable c: ");
}
}
delay(100);
}
i intend connect 16x2 lcd display i'll settle view data in "serial monitor" in arduino ide 1.0.5.
i made small application in c # send data arduino. 3 variables. distinguish each, first send byte 'a', behind him decimal numeric values ??shown thereupon send 'b' other numerical data execute code in b above , same 'c' .
if send secuantia c #:
quote
a100b10c100
in serial monitor shows this:
quote
vida: ha llegado variable a:
balas: ha llegado variable b:
mana: ha llegado variable c:
should appear:
quote
vida: ha llegado variable a:
vida: 100
balas: ha llegado variable b:
balas: 10
mana: ha llegado variable c:
mana: 100
how capture data in each corresponding numbers if?
i hope have explained well.
a greeting.
Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > Receive data from Arduino UNO R3
arduino
Comments
Post a Comment