user28706: A byte stores an 8-bit unsigned number, from 0 to 255.
I can understand the following line:
byte b = B10010;  // "B" is the binary formatter (B10010 = 18 decimal) 

But I also saw a use such as:
volatile byte state = LOW;

What does the last line mean here? Is that special for Arduino?
I mean LOW is not a 8 bit unsigned number. LOW is not a number here.

user23002: It is common practise in C/C++ to define certain much-used constants at the beginning of the code.
#define true 1

this means that every time you write true in your code, the compiler will see it as 1.
The arduino IDE comes with a few constants predefined:

true = 1
false = 0
HIGH = 1
LOW = 0
...


user-1: There is probably somewhere else, like this:
#define LOW 0

Which means the pre-processor turns your line from this:
volatile byte state = LOW;

into this:
volatile byte state = 0;

There is nothing arduino-specific here, just the use of standard C/C++ features.

28706: <p>A byte stores an 8-bit unsigned number, from 0 to 255.</p>

<p>I can understand the following line:</p>

<pre><code>byte b = B10010;  // "B" is the binary formatter (B10010 = 18 decimal) 
</code></pre>

<p>But I also saw a use such as:</p>

<pre><code>volatile byte state = LOW;
</code></pre>

<p>What does the last line mean here? Is that special for Arduino?
I mean LOW is not a 8 bit unsigned number. LOW is not a number here.</p>
 23002: <p>It is common practise in C/C++ to define certain much-used constants at the beginning of the code.</p>

<pre><code>#define true 1
</code></pre>

<p>this means that every time you write true in your code, the compiler will see it as 1.</p>

<p>The arduino IDE comes with a few constants predefined:</p>

<ul>
<li>true = 1</li>
<li>false = 0</li>
<li>HIGH = 1</li>
<li>LOW = 0</li>
<li>...</li>
</ul>
 -1: <p>There is probably somewhere else, like this:</p>

<pre><code>#define LOW 0
</code></pre>

<p>Which means the pre-processor turns your line from this:</p>

<pre><code>volatile byte state = LOW;
</code></pre>

<p>into this:</p>

<pre><code>volatile byte state = 0;
</code></pre>

<p>There is nothing arduino-specific here, just the use of standard C/C++ features.</p>
