Encoder Drivers

Hello,

I am quite new to RIOT, and, as a robot developper, I searched for hardware-managed quadratic encoders. Didn't found.

I think is would be great to add this kind of API to "periph". I have experience in STM32F4 encoders, and I can help to implement at least for this microcontroller family.

Cheers,

Loïc

Hi !

I'm not sure, but is this quadratic encoder the same thing as "rotary encoder" ? If so, I have a simple driver working. If not, then sorry for the noise.

Marc

I think it is the same. And I made a mistake, it is not called "quadratic encoder", but "quadrature encoder", or "rotary encoder", as you said. Is your driver in the repository ?

Loïc

No, it's not in the repository, but I can make it available for you to test. It is still in a Q&D state.

Marc

Yes, it can be interesting. For stm32f4 ?

Loïc

I've been using it on lm4f120, but it's not specific to any hw... It only uses 2 gpio with interrupt.

Marc

Hi Marc, Could you PR this (as WIP, if needed)? Would be great. Cheers, Emmanuel

Hi,

sure, I'll try to push that in few days.

Marc

Hi, Could you link the PR please?

Thanks Baptiste

Sorry, busy days. My code is at work so it will have to wait until monday.

Current code is really not in a state that can be merged as it's integrated in a prototype application (no API, everything still working with globals...). But I'll push a WIP PR on monday !

Sorry for the delay

Marc

Sorry again for the delay. I've started to extract the code from my prototype and I should be able to push it tomorrow for WIP/review.

Marc

Here it is.

https://github.com/RIOT-OS/RIOT/pull/5168

I've tested it locally and it seems to be ok. Keep in mind that's a first draft, so there are most probably lots of bugs...

Marc