How to connect Rotary encoder to Axoloti?


#1

Hi there,

I'm trying to connect a rotary encoder to my Axoloti, but I don't find the solution.
I have a 3 pins rotary like that :


With Arduino I connect left to +, right to -, middle to Analog In and it works.
I tried to do the same with Axoloti and it doesn't work.
Is someone can help me ??

Thanks for all


#2

Hi @FloSan,

You try to connect Potentiometer or rotary encoders ? In your link it's potentiometer.
Follow this link : https://sebiik.github.io/community.axoloti.com.backup/t/official-pin-out-ports-documentation/202/11
and this : https://sebiik.github.io/community.axoloti.com.backup/t/official-pin-out-ports-documentation/202/5

For example, connect GND and VDDA on the 2 extrem pins and GPIOB1 on pin in the middle.
Then use gpio/in/analog object with PB1 for parameter :

Hope this helps you.


#3

Hi JeromeB,

Thanx for you answer. It works well. I tried with PA and not with PB.