Vending using the DG600F(s) 6 coin acceptor

6v6gt:
You are integrating a number of components into a single sketch which has now got quite complex and you are getting logic errors and it is difficult to follow.
It appears that you have got the LCD right because you get a message on it.
But your error description is focused on the logic to handle the coin acceptor. My suggestion is that you create a new sketch which handles only the coin acceptor logic (that is without LCD; Keypad, Relays etc.) and imbed lots of Serial.print statements so you see what it is doing.
Once that works, start adding the LCD and then other components.

Thanks :). I have had the coin acceptor working in a previous incarnation of the sketch. I then used that to build this one. I think you are spot on that it is complex and that is what is causing the issue. I originally built this from smaller sketches (LCD, Relay, Keypad etc) and individually I have been getting them to work, it is when I integrated them I started having issues.

This is the first attempt at using the switch command and also a sketch that does staged things one after the other. I think that is where my issue is but I have yet to be able to identify it.

Ill break it apart again and see if I can try a new draft. If you are happy I will post the new sketch and see what you think on version 100 :slight_smile:

Really appreciate the guidance.