I'm having a problem to count coins in raspberry 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 the Coin Counter sends a pulse with value 1 constantly and the value 0 when the coin down. But in the console is showing 0 and 1 at random. And nothing change when coin dropped.
4 wire outputs: black and red are 12v (font), white is pulse on 23 pin (1 constantly, 0 when drop the coin) and purple is to count coins on separeted led. Font 12v, and pulse (white wire) is 0.19~0.25 volts, and I used 10k resistor in this wire. And I use Raspberry pi B+.
Obs: Pulse is digital.
I have this Coin Counter: