PC::PC(int pwm, int heating, int cooling, long frequency)
{

 	_pwmPin = pwm;
 	_heatingPin = heating;
 	_coolingPin = cooling;
	SetPinFrequencySafe(pwm, frequency);
	peltierState = PeltierStopped;
}
Exemple #2
0
void setup()
{
  //initialize all timers except for 0, to save time keeping functions
  InitTimersSafe(); 

  //sets the frequency for the specified pin
  bool success = SetPinFrequencySafe(led, frequency);
  
  //if the pin frequency was set successfully, turn pin 13 on
  if(success) {
    pinMode(13, OUTPUT);
    digitalWrite(13, HIGH);    
  }
}