Hey all, i would like to ask is it possible to use 2 Arduino Board at the same time as i would need to store a value into the analog pin of my Arduino Pro Mini and then use Arduino Nano to read the value and then print it onto the Serial Monitor. If it's possible, i'll just have to declare an integer of the analog pin that i want to store the value to on the 1st program and then analog read the value on the 2nd program?
Two board can be connected to a PC using 2 USB, so on PC you have 2 different virtual COM port (for example COM1 e COM2).
So boards can comunicate with PC and 2 Arduino IDE, one opening Serial Monitor on first COM and second on other COM.
If you use an analog pin in writing of one board I think you connect an hardware, or you think to connect simply an analog pin of the second board and use this 2 pins as communication channel?
@nid69ita hey thanks for the quick reply, what i'm trying to do is that , i'm using the Arduino Pro Mini & Nano whereby a MaxSonar sensor is connected to the Arduino Pro Mini and i would like to get the value from the MaxSonar sensor from one of the analog pin of the Arduino Pro Mini and use Arduino Nano to Serial.print the value onto the Serial Monitor using 1 PC
What I cannot figure out here, is why you are proposing to use two Arduino devices when it would clearly be vastly easier to use one and avoid the complexities and limitations of communication between the two.
Your original proposal to generate an analog output and then read it from a second device was deeply flawed, since there is no analog output function on the Arduino, only the possibility of PWM which can be filtered to an approximate analog value but results in a substantial delay in the response and loses resolution in the process.
Paul__B:
What I cannot figure out here, is why you are proposing to use two Arduino devices when it would clearly be vastly easier to use one and avoid the complexities and limitations of communication between the two.
Defining "fun" as hard work, it certainly would be.
The absurdity here is that he is expecting a serial data output and the first Arduino in the chain is going to have to implement a serial protocol of some sort to pass the information on to the second, whose task then is little or no more than to take serial data in one portal and send it out another. Whatever formatting it might need to do in the process, could just as easily be performed by the first unit and be sent out in the necessary form directly.
I suspect there is perhaps some concern that it may be difficult to perform both the sound "pinging" for distance sensing, and the serial data formatting at once, but that is firstly, going to be equally problematic for whatever form of serial interface it feeds and secondly, not insurmountable in itself by any means.