user57427: I am developing a control system in my raspberry, but i have the problem that it doesn't have any analogue port, so if i use an arduino to convert de signal from analogue to digital and after send this signal into a I/o digital port from anduino to raspberry, thas is posible?
my plan was receive the analog signal in arduino and transforms here in a digital signal and after send it by Digital port to rasberry 

user7508: It is not clear what you mean by “digital port”. The simplest mean to
communicate from the Arduino to the Raspberry is to use the Arduino's
serial port, which gets into the Raspberry Pi through USB. Just like you
would do if you had a PC instead of the Raspberry:
/*
 * Continuously report the analog readings on pins A0 through A2.
 */

void setup() {
    Serial.begin(9600);
}

void loop() {
    Serial.print("0 "); Serial.println(analogRead(A0));
    Serial.print("1 "); Serial.println(analogRead(A1));
    Serial.print("2 "); Serial.println(analogRead(A2));
}

This program will continuously output a text stream like this:
0 145
1 220
2 865
0 142
1 223
...

where the first column is the analog channel number and the second
column is the ADC value. How you handle this stream on the Raspberry
side is up to you.

57427: <p>I am developing a control system in my raspberry, but i have the problem that it doesn't have any analogue port, so if i use an arduino to convert de signal from analogue to digital and after send this signal into a I/o digital port from anduino to raspberry, thas is posible?</p>

<p>my plan was receive the analog signal in arduino and transforms here in a digital signal and after send it by Digital port to rasberry </p>
 7508: <p>It is not clear what you mean by “digital port”. The simplest mean to
communicate from the Arduino to the Raspberry is to use the Arduino's
serial port, which gets into the Raspberry Pi through USB. Just like you
would do if you had a PC instead of the Raspberry:</p>

<pre class="lang-cpp prettyprint-override"><code>/*
 * Continuously report the analog readings on pins A0 through A2.
 */

void setup() {
    Serial.begin(9600);
}

void loop() {
    Serial.print("0 "); Serial.println(analogRead(A0));
    Serial.print("1 "); Serial.println(analogRead(A1));
    Serial.print("2 "); Serial.println(analogRead(A2));
}
</code></pre>

<p>This program will continuously output a text stream like this:</p>

<pre><code>0 145
1 220
2 865
0 142
1 223
...
</code></pre>

<p>where the first column is the analog channel number and the second
column is the ADC value. How you handle this stream on the Raspberry
side is up to you.</p>
