I'm building a bike-wheel LED project that wants to know how fast the wheel is turning, and what position it is in as it spins.
Got A1120EUA-T from hobbytronics
turns out you can't set pullups from sysfs (/sys/class/gpio) ... so i'll have to install wiringpi for the
and now I can wave my neodymium magnets nearby (about 1.5cm) and see the input go low as it passes by.
Got A1120EUA-T from hobbytronics
turns out you can't set pullups from sysfs (/sys/class/gpio) ... so i'll have to install wiringpi for the
gpio
command.
$ gpio export 0 in $ gpio mode 0 up
and now I can wave my neodymium magnets nearby (about 1.5cm) and see the input go low as it passes by.
$ while true; do gpio read 0 ; done 1 1 1 0