Hi all,
I want to control the velocity of a motor using a raspberry Pi 4b and a quadrature encoder. I have managed to do this using the gpiozero library, but want to move away from python to increase speed. I was wondering how I could write code to read an encoder in C? I can't seem to find any C librarys pre-built in functionality like gpiozero, so would I need to write my own functions using interrupts? If so, what is the best way to get the speed and direction from a quadrature encoder?
Cheers
I want to control the velocity of a motor using a raspberry Pi 4b and a quadrature encoder. I have managed to do this using the gpiozero library, but want to move away from python to increase speed. I was wondering how I could write code to read an encoder in C? I can't seem to find any C librarys pre-built in functionality like gpiozero, so would I need to write my own functions using interrupts? If so, what is the best way to get the speed and direction from a quadrature encoder?
Cheers
Statistics: Posted by Harisunn_ — Mon Aug 12, 2024 11:53 am — Replies 1 — Views 51