How do I read in Pulse Widths? - Raspberry Pi Forums


i've got device (sparkfun's 3 coin acceptor: https://www.sparkfun.com/products/11719) outputs signal in pulse widths. how can read signal in?
comfortable using rpi.gpio library simple i/o, i'm not sure this. can handled rpi.gpio?

on phone autocorrect try break this

start = time.time()
stop = time.time()
while gpio.input(pin) == 0:
start = time.time()
while gpio.input(pin) == 1
stop = time.time()
elapsed = stop - start


elapsed equal length of pulse.


raspberrypi



Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial