I have a problem counting coins in raspberries pi B + usin RPi-GPIO.
This is the code:
import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN) while True: print(GPIO.input(23))
I called the manufacturer and he said that the coin counter sends an impulse with a value of 1 constantly and a value of 0 when the coin falls. But the console displays 0 and 1 in random order. And nothing changed when the coin fell.
4-wire outputs:
- Black and red: 12v (font)
- White: this is an impulse (1 constantly, 0 when a coin is thrown). It is connected to the raspberries of the 23rd pin (I choose this pin because it is available).
- Purple: This is a coin count on a split LED.
Voltage: 12v font and pulse (white wire) are 0.19 ~ 0.25 volts
Note: pulse is digital.
I have a coin counter:

source share