Example #1
0
void DigitalPin::setMode(char* mode) {
  if (!strcmp("PWM", mode)) {
    _pwm = true;
  } else {
    _pwm = false;
    _mode = PinMode(mode);
    pinMode(this->getPin(), _mode.get());
  }

}
Example #2
0
void Pin::reset() {
  this->setMode(PinMode(INPUT));
  this->setValue(PinValue(LOW));
}