예제 #1
0
void Motor::control(unsigned short level)
{
#ifndef NDEBUG
	assert(0 <= level && level <= 1000);
#endif
	pwmWrite(pin,levelToCtrl(level));
}
예제 #2
0
void Motor::control(int index,unsigned short level)
{
#ifndef NDEBUG
	assert(0 <= index && index <= 3);
	assert(0 <= level && level <= 1000);
#endif
	pwmWrite(pin[index],levelToCtrl(level));
}