ChristophGaukel / ev3-python3

Use python3 to program your LEGO EV3. Communicate via Bluetooth, WiFi or USB. Send direct commands.
Other
47 stars 15 forks source link

Duty cycle control #17

Open valentin-burillier opened 5 months ago

valentin-burillier commented 5 months ago

Hello,

I'd like to create my own servo system. To do this, I want to control the duty cycle of the motors. However, I haven't found any method of doing this. Is there one? Or is there a way to do it?

Thanks in advance

ChristophGaukel commented 3 months ago

Hello Valentin, sorry for my late reaction. If you took a close look to my code, then you found a lengthy direct command, which reads the motor positions of two motors and then calculates the speed. I think, this is the way, you can code your own servo system. My version is not very smooth, and indeed can be improved. Kind regards, Christoph