DigitalWrite

From wikipost
Jump to navigation Jump to search
void digitalWrite(int pin, int state)
{
  if (state == HIGH)
  { 
    (PORTB |= (1 << pin)); 
  } else {
    (PORTB &= ~(1 << pin));
  }
}