import jcontrol.io.PWM;

/**
 * This example demonstrates the usage of class <code>PWM</code>.
 */
public class PWMExample {
  /** PWM frequency */
  int frequency = 2000;
  /** PWM channel */
  int  channel = 0;
  /** PWM duty cycle */
  int duty = 127; 
  
  /** 
   * Set PWM frequency, duty cycle and turns the signal on.
   */
  public PWMExample() {
    PWM.setFrequency(frequency);
    PWM.setDuty(channel, duty); 
    PWM.setActive(channel, true);
  }

  /**
   * Main method. Program execution starts here.
   */
  public static void main(String args[]) {
    new PWMExample();
    
    for (;;) {} // sleep
  }
}
