Hi,
I´m new in this beautiful of programming. I have 2 arduinos and I want to communicate each other.
What ways do I have to do this? and, What information can I send????? Obviously wired...
On the other hand, I want to know what´s the utility of having 2 or more windows in an arduino program
Is it only to see it better??? Or has it an utility?
I have 2 arduinos and I want to communicate each other.
What ways do I have to do this? and, What information can I send?
you can communicate via serial, SPI, or I2C. the information you can send is the information you gather or generate in the programs you write
Telmooo:
What information can I send
Anything you want.
On the other hand, I want to know what´s the utility of having 2 or more windows in an arduino program
Is it only to see it better??? Or has it an utility?
I don't know what you have in mind when you refer to "windows in an arduino program". In my mind "windows" are PC concept.
Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.
The technique in the 3rd example will be the most reliable. It is what I use for Arduino to Arduino and Arduino to PC communication.
You can send data in a compatible format with code like this (or the equivalent in any other programming language)
Serial.print('<'); // start marker
Serial.print(value1);
Serial.print(','); // comma separator
Serial.print(value2);
Serial.println('>'); // end marker
If you are using Unos it would be a good idea to use SoftwareSerial for communication with the other Arduino so as to leave HardwareSerial (pins 0 and 1) free for uploading code and for debug messages to the Arduino Serial Monitor.
...R