Advertisement
sunu

Uji 2 pwm generator

Apr 25th, 2019
255
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. /*
  4.  
  5. Uji coba 2 PWM
  6.  
  7.  
  8. */
  9.  
  10. #define PWM_PIN_A 9
  11. #define PWM_PIN_B 10
  12.  
  13. const uint8_t pwmValue01 = 0;
  14. const uint8_t pwmValue02 = 255;
  15.  
  16.  
  17. void setup(void){
  18.     pinMode(PWM_PIN_A, OUTPUT);
  19.     pinMode(PWM_PIN_B, OUTPUT);
  20.  
  21. }
  22.  
  23.  
  24. void loop(void){
  25.     analogWrite(PWM_PIN_A, 20);
  26.     analogWrite(PWM_PIN_B, 200);
  27. }
Advertisement
RAW Paste Data Copied
Advertisement