i need help with reading interrupts from coin acceptor and activating respective solenoids based on the interrupt received. for example if i set the coin acceptor to give 5 pulses for p1 coin, arduino should be able to read the 5 pulses and activate the respective solenoid/led and for p2 coin if pulses is 2 arduino should activate another solenoid/led. Please help me program this.
i've connected pulse of coin acceptor to interrupt 0 which is pin 2 on arduino
and for solenoid i've connected transistor and a digital pin is connected to the base so when p1 is detected arduino shld read the interrupt and push solenoid and for p2 another solenoid
solenoid i"ve used is of 5V, and coin acceptor is 12V and i've shorted the ground of arduino and 12V supply i need help with program only Please help.