void MiniLed::attach(int pin) { pinNumber = pin; SoftPWMSet(pinNumber, 0); //pinMode(pinNumber,OUTPUT); ledMin = LED_MIN; ledMax = LED_MAX; }
void SoftPWMSetPercent(int8_t pin, uint8_t percent) { SoftPWMSet(pin, ((uint16_t)percent * 255) / 100); }
void SoftPWMSetPercent(int8_t pin, uint8_t percent, uint8_t hardset) { SoftPWMSet(pin, ((uint16_t)percent * 255) / 100, hardset); }
void MiniLed::setIntensity(int intensite) { intensite = constrain(intensite,ledMin,ledMax); SoftPWMSet(pinNumber, intensite); //analogWrite(pinNumber,intensite); }