pinMode configures a pin to be used as either input or ouput. A pin configured for input is allowed to read the voltage/level present on pin using digitalRead. A pin configured for ouput is allowed to drive the voltage/level according to its setting, the setting can be changed using digitalWrite.
- Beta 3
void pinMode(int pin, int mode);
void pinMode(u8 pin, u8 mode);
- pin = pin number to set (from 0 to 17 for PIC18F2550)
- mode = required mode INPUT (= 1) or OUTPUT (= 0)