How to make an arduino receive a number from another arduino?

Hello!

I'll try to be really clear: Is it possible or did anyone already tried to connect the analog output of an arduino to an analog input of another arduino?

I need that because I want one of my arduinos to read a sensor and make all necessary manipulations, and then just send a value between 0 and 1023 to the other arduino based on the manipulations it did it.

I tried to find something about it but I wasn't lucky...

Or maybe, rather than using analog I/O, would it be possible to use serial communication (pins 0 and 1) to send that value between 0 and 1023?

I think your idea is basicly nice, but you probably don't know that analog output gives PWM. Using suitable filter might give you something to read, near DC, but it wouldn't match easily with the signal you are trying to send.

So, serial it is, probably the easiest way.

Cheers, Kari

If the two Arduinos are close together (within half a meter or so), you can also network them using I2C.

There were some examples in the "Exhibition" section of the old forum about 6 months ago (did they make it into the Playground??).

Or connect them using standard serial or newsoftserial…

Thanks for the answers everyone. I'm going with serial communication then.

robtillaart: Or connect them using standard serial or newsoftserial...

Is there any advantage in using newsoftserial in this case? I've never used so I'm a beginner with that. I thought about using the standard serial just for simplicity.

SPI, / The TX and RX pin's are there for the same purpose use them. :%

Is there any advantage in using newsoftserial in this case?

There is one. NewSoftSerial lets you use any two pins to send/receive serial data, leaving the RX/TX pair free to communicate with the PC, which can be invaluable for debugging purposes.