void MiniLed::attach(int pin)
{
	pinNumber = pin;
	SoftPWMSet(pinNumber, 0);
	//pinMode(pinNumber,OUTPUT);
	ledMin = LED_MIN;
	ledMax = LED_MAX;
}
예제 #2
0
void SoftPWMSetPercent(int8_t pin, uint8_t percent)
{
  SoftPWMSet(pin, ((uint16_t)percent * 255) / 100);
}
예제 #3
0
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);
}