Go Down

Topic: angular position sensor (Read 1 time) previous topic - next topic

Azouza

Good evening,
can any one tell me  how to use an angular position sensor / magnet position  AS500106 and AN8/ how does it work
and how to connect it to  Arduino   

knut_ny

datasheet explains. http://cherryswitches.com/us/wp-content/uploads/sites/7/2014/07/Angle-Position-Sensor-Datasheet-AN8.pdf

Run sensor from 5V.
If 180 deg type:
Datasheet says 10% of 1023 = 102 (0 deg)
and  90% of 1023 = 920 (180 deg)

int num=analogRead(pin);
int angle = map(num,102,920,0,180);
Ny

Go Up