good evening,
can 1 tell me how use angular position sensor / magnet position as500106 , an8/ how work
and how connect to arduino
can 1 tell me how use angular position sensor / magnet position as500106 , an8/ how work
and how connect to arduino
datasheet explains. http://cherryswitches.com/us/wp-content/uploads/sites/7/2014/07/angle-position-sensor-datasheet-an8.pdf
run sensor 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);
run sensor 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);
Arduino Forum > Using Arduino > Sensors > angular position sensor
arduino
Comments
Post a Comment