I have an Arduino and I am wondering exactly what HIGH and LOW mean as far as actual values go... Are they signed ints? Unsigned ints? Unsigned chars??? What are their values? I
Have a look at hardware/arduino/cores/arduino/Arduino.h
(at least in Arduino 1.0.1 software), lines 18 and 19:
#define HIGH 0x1
#define LOW 0x0
Meaning, these defines being hexadecimal integer values, you can do whatever bitwise operations you want with them - how much sense that will make, however, is not really clear to me at the moment. Also bear in mind that these values might be subject to change at a later time - which would make bitwise operations on them even more unwise.
The first argument to digitalWrite() is a pin number.
The second argument to digitalWrite() will either:
Bitwise operations for either argument make no sense. Perhaps you need to use analogWite()?
See the documentation: digitalWrite() Constants
If you want to pass other values to digitalWrite() you can have a look at the function prototype
void digitalWrite(uint8_t, uint8_t);
So any integer value (well, 0 through 255) would work. No idea what the behavior of digitalWrite() could be if you passed it a value other than HIGH and LOW.
Since HIGH and LOW are simply defined constants, you can't cast an integer to them (nor would that operation make sense). It appears that you could use an integer anywhere that HIGH and LOW was expected.
Actually doing this is a bad idea though, for lots of reasons - the definitions of HIGH and LOW could change (unlikely but possible) and it doesn't make sense from a type perspective. Instead, you should use logic in your program to determine whether HIGH or LOW should be passed to the function call, and then actually pass the constant.
To add my two cents to codeling's answer:
Lines 18--25 of Arduino.h
(1.0) are:
#define HIGH 0x1
#define LOW 0x0
#define INPUT 0x0
#define OUTPUT 0x1
#define true 0x1
#define false 0x0
Therefore, HIGH <==> OUTPUT <==> true <==> 0x1
and LOW <==> INPUT <==> false <==> 0x0
.
Then, HIGH <==> !LOW
and LOW <==> !HIGH
...