count encoders with raspberry pi 4

asked 2020-07-10 17:21:15 -0500

mateusguilherme gravatar image


I have a raspberry pi 4 and I am in doubt about how to count the encoders of the engines ( using python. I thought about using ls7366r or through events with pigpio ( What do you guys tell me? Is there a better solution?

thank you

edit retag flag offensive close merge delete



I would go the IC road. The pi is still limited, specially if you want to do more complex robotics stuff (lidar, rgbd, etc.) down the road. Python, in my opinion, just isnt ideal for anything peripheral control. Serial data is slow most of the time, and adding additional lag (can be 100 times slower then C++) by using python is just suboptimal. It also uses lots of computing resources wich I wouldnt want to waste on an arm sbc in a robotics project. "better solution?": There are controller boards and IC´s that do PID for vel and position (plus current sense etc.) all in one, I would call that the ideal path, but they might be expensive and overkill. For some Dollar you could make an arduino or similar do a similar task (low resolution hal based encoders), and there are lots of libraries for all that already ...(more)

Dragonslayer gravatar image Dragonslayer  ( 2020-07-11 09:50:15 -0500 )edit