that sucks Where’d you get it from?
I bought it here in the link below
I doubt you can read the state of coin inserts via simple digitalRead if the output from the device is PWM. On that page it says this:
Output Type: PWM
That means the output signal is a pulse width modulated signal. You should probably use
analogRead. Try adding the following in the loop where you see “Waiting for pulse”:
int val = analogRead(Coinpin); // read the input pin Serial.println(val); // debug value
Watch what happens to the value when you insert a coin. Maybe different coins show different values?
With any luck, it’ll be a replica of the Sparkfun coin acceptor (https://www.sparkfun.com/products/11636) which has a few documents you can download, one of which is the datasheet. Do the connectors on yours resemble those of the Sparkfun coin acceptor?
Did you try calling them? Maybe they can email you the information.
Ill try to change the wiring and ill update the codes
I very much doubt that. You’re going to need a datasheet and probably a library to read from the coin acceptor. Without that you’re going to have a very hard time making this work.
Hey, guys I just thought of something. Why don’t we continue this discussion until we reach 100? I mean we’re pretty close to it. That way we can get the reader badge.
Thank you sir i’m goin to stick in this codes.
This is the updated codes, in this codes the fucntion of the system is opposite when you insert coin the relay turns off with a 5 sec time but after the 5 sec the relay continue to go on
CZONETRIAL1.ino (3.0 KB)
That’s a little strange; you print coinpin LOW in the branch of code for when it’s HIGH and vice versa.
What is the serial output you see?