pigpio icon indicating copy to clipboard operation
pigpio copied to clipboard

ask for help

Open Canees opened this issue 2 years ago • 2 comments

Hello moderator: Can you come up with a use case for electronic speed controller? I am a novice do not understand how PWM is generated, tried a lot of methods

Canees avatar Sep 20 '21 05:09 Canees

I am a novice do not understand how PWM is generated, tried a lot of methods

What have you tried and what were the problems?

fivdi avatar Sep 26 '21 17:09 fivdi

I am a novice do not understand how PWM is generated, tried a lot of methods

What have you tried and what were the problems?

Hi, sorry for taking so long to reply: for example: let speed = 0 let timer = setInterval(() => { speed++ if (speed > 3) { this.motor.servoWrite(Math.round(3 * 1000 / 7 + 1000)) clearInterval(timer) console.log('End of the calibration....') } else { this.motor.servoWrite(Math.round(speed * 1000 / 7 + 1000)) console.log('In the calibration:', speed) } }, 2000); I am referring to the steering gear example given in the document,But using PWM for testing is useless, although I know it is used for leds。 The above example is very troublesome because the median value of each electrical modulation is different and cannot be automatically calibrated. Do you have any good suggestions?

Canees avatar Oct 08 '21 03:10 Canees