Hello guys, im trying to communicate 2 pcs of arduino together. and here is the simple explanation
1 arduino a as transmitter send data to arduino b as receiver
2 arduino b which already get dta from arduino a will send data on arduino b + arduino data to PC
3 i want only 1 COM detected on PC
To give you an idea how to set something up to identify the Arduino that actually need to communicate with the PC:
You can let the PC application communicate via the different serial ports.
The application can send a message to each serial port like "Hi, are you there?" and the relevant Arduino can reply with "Yes"; the other Arduino will not reply.
Or
The application can send a message to each serial port like "Hi, who are you?" and the Arduinos can reply with "Hello, I am A" and "Hello, I am B".
In both cases, you will know who you need to talk to (which port to use).
blh64:
How are the communication? You can use i2c (e.g. wire library) or a serial port (either the hardware version of SoftwareSerial)
Sounds like arduino B is connected to the through the standard USB/COM port
Arduino A will be connected to pc , example like the arduino B reading the Temperature sensor , and arduino A read the turbidity sensor, then arduino B send the temperature data to A which A will send both data to PC. is it possible ?
You can't send a String (capital S) directly. You will have to convert it to a character array and send that.
It's advisable to forget that String (capital S) exists on Arduinos. Extensive use of it will sooner or later give you problems; so better forget about its existence.
sterretje:
You can't send a String (capital S) directly. You will have to convert it to a character array and send that.
It's advisable to forget that String (capital S) exists on Arduinos. Extensive use of it will sooner or later give you problems; so better forget about its existence.
You have 2 Arduinos, 2 Connecting Cables, and 1 PC with multiple USB Ports. You can easily setup your project as per following conceptual diagram where Software UART Ports have been used to exchange data between the Arduinos. If you wish, you can also connect the arduinos using hard/soft I2C Bus.
Please, try to write some codes and post them. The Forum members are generously eager to help themselves and others.