Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Arduino source code for KC868-AIO]-07 PWM_ALL_ON AND OFF
#2
(03-23-2023, 01:24 AM)KinCony Support Wrote: [Arduino source code for KC868-AIO]-07 PWM_ALL_ON AND OFF
Code:
/* KC868-AIO_PWM OUTPUT AO_O01----AO_O016*/

#include "PCA9685.h"
PCA9685 pwmController;                

void setup() {
    Serial.begin(115200);              
    Wire.begin(4,16);                  
    pwmController.resetDevices();     
    pwmController.init();              
}

void loop() {
    pwmController.setPWMFrequency(100);      
          for(int j=0;j<=15;j++){
              pwmController.setChannelPWM(j, 0);
              Serial.println(pwmController.getChannelPWM(j));
           }
           delay(1000);
         for(int j=0;j<=15;j++){
              pwmController.setChannelPWM(j, 4096);
              Serial.println(pwmController.getChannelPWM(j));
           }
           delay(3000);

   
}

Hello dear.. I tried to apply this lesson, but unfortunately this error appears.. The same library was used


Attached Files Image(s)
   
Reply


Messages In This Thread
RE: [Arduino source code for KC868-AIO]-07 PWM_ALL_ON AND OFF - by Majed774 - 05-12-2024, 04:29 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)