user6373: i need to read all Read all Digital input in arduino once time; example:
Serial.write(digitalRead(0),digitalRead(1),...,digitalRead(13));

to receive state of all digital pin in one times from my app build with delphi

user6373: void setup()
{
  Serial.begin(115200);
}

void loop()
{
  Serial.print("<");
  for (int p = 0; p < 14; p++)
  {
    Serial.print(digitalRead(p));
  }
  Serial.println(">");
}


user368: According to the pin mapping, D0-D13 and A0-A5 are mapped to ports B, C, and D. So simply read the raw ports as bytes, send the values, and decode them on the other side.
Serial.write(PINB);
Serial.write(PINC);
Serial.write(PIND);

Note that A6 and A7 (on boards that have them) are not mapped to digital pins and so cannot be read in this way.

6373: <p>i need to read all Read all Digital input in arduino once time; example:</p>

<pre><code>Serial.write(digitalRead(0),digitalRead(1),...,digitalRead(13));
</code></pre>

<p>to receive state of all digital pin in one times from my app build with delphi</p>
 6373: <pre><code>void setup()
{
  Serial.begin(115200);
}

void loop()
{
  Serial.print("&lt;");
  for (int p = 0; p &lt; 14; p++)
  {
    Serial.print(digitalRead(p));
  }
  Serial.println("&gt;");
}
</code></pre>
 368: <p>According to <a href="http://arduino.cc/en/Hacking/PinMapping168" rel="nofollow">the pin mapping</a>, D0-D13 and A0-A5 are mapped to ports B, C, and D. So simply read the raw ports as bytes, send the values, and decode them on the other side.</p>

<pre><code>Serial.write(PINB);
Serial.write(PINC);
Serial.write(PIND);
</code></pre>

<p>Note that A6 and A7 (on boards that have them) are not mapped to digital pins and so cannot be read in this way.</p>
