From 584f2b280cc6bc766b01bc4f765647371bdb08f5 Mon Sep 17 00:00:00 2001 From: pgp Date: Wed, 23 Dec 2020 18:21:32 +0100 Subject: [PATCH] =?UTF-8?q?r=C3=A9glage=20de=20la=20vitesse=20du=20pid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c4907b2..6b4a40e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,7 +23,7 @@ #define PCNT_INPUT_CTRL_IO 2 // Control GPIO HIGH=count up, LOW=count down bool sem_compteur; // sémaphore pour le compteur int16_t pulsations = 0; // variable de compteur -int vitesse; +int vitesse = 2400; //vitesse de rotation en tr/min // int16_t Pulses = 0; // variable de lecture de compteur byte pulsePin = 13; //broche de l'encodeur @@ -126,7 +126,7 @@ void pid () { void pidsetup() { //initialize the variables we're linked to Input = analogRead(PIN_INPUT); - Setpoint = 100; + Setpoint = vitesse; //turn the PID on myPID.SetMode(AUTOMATIC); }