Il y a 4 heures
dans la doc:
5). PWM control type: Refer to the PWM figure, may accept pulse signals, such as PLCs with variable duty ratio, don't need AD conversion, it is easy to use. The acceptable signal frequency range is 1KHZ-3KHZ. The signal input peak level is 4-24VDC. This product can be compatible with the 5V CPU interface of conventional industrial control card and conventional PLC interface.
mini 4volts or l'esp32 max 3.3v donc faudra adapter les niveaux
// Définition des paramètres PWM
const int gpioPwm = 23; // Broche PWM
const int pwmChannel = 0; // Canal PWM
const int pwmFreq = 2000; // Fréquence PWM (en Hz)
const int pwmResolution = 8; // Résolution (8 bits = 0-255)
dans Solar_Router_V12_06.ino
a rajouter dans setup()
ledcSetup(pwmChannel, pwmFreq, pwmResolution); // Attacher le canal PWM à la broche
ledcAttachPin(gpioPwm, pwmChannel);
ligne 482 a la place de dacWrite(25, PulseOn[i]/PulseTotal[i]);
ledcWrite( pwmChannel , ((PulseOn[i] *255)/ PulseTotal[i]);
et pour stop
ledcWrite( pwmChannel , 0);
a verifier j ai pas test.
5). PWM control type: Refer to the PWM figure, may accept pulse signals, such as PLCs with variable duty ratio, don't need AD conversion, it is easy to use. The acceptable signal frequency range is 1KHZ-3KHZ. The signal input peak level is 4-24VDC. This product can be compatible with the 5V CPU interface of conventional industrial control card and conventional PLC interface.
mini 4volts or l'esp32 max 3.3v donc faudra adapter les niveaux
// Définition des paramètres PWM
const int gpioPwm = 23; // Broche PWM
const int pwmChannel = 0; // Canal PWM
const int pwmFreq = 2000; // Fréquence PWM (en Hz)
const int pwmResolution = 8; // Résolution (8 bits = 0-255)
dans Solar_Router_V12_06.ino
a rajouter dans setup()
ledcSetup(pwmChannel, pwmFreq, pwmResolution); // Attacher le canal PWM à la broche
ledcAttachPin(gpioPwm, pwmChannel);
ligne 482 a la place de dacWrite(25, PulseOn[i]/PulseTotal[i]);
ledcWrite( pwmChannel , ((PulseOn[i] *255)/ PulseTotal[i]);
et pour stop
ledcWrite( pwmChannel , 0);
a verifier j ai pas test.