Beispiel #1
0
void Motor::speedPin(
   const int& value)
{
   Pin* pin = Esp8266::getInstance()->getPin(speedPinId);

   if (pin)
   {
      pin->analogWrite(value);
      Logger::logDebug("Speed pin[" + String(pin->getPinId()) + "] = " + String(value) + "\n");
   }
}
Beispiel #2
0
void Motor::directionPin(
   const int& value)
{
   Pin* pin = Esp8266::getInstance()->getPin(directionPinId);

   if (pin)
   {
      pin->digitalWrite(value);
      Logger::logDebug("Direction pin[" + String(pin->getPinId()) + "] = " + String(value) + "\n");
   }
}