No sir. Sometime if I plug it in it the display show any kind of symbols and the other components doesn't work..
But here the primarily function I want to this project..
We using Arduino at mega 2560 . 2 pcs stepper motor . 1pcs active buzzer 3-24 active buzzer. 2 pcs Ultrasonic sensor Red green blue module led. 12 c lcd . Tack button switch . 12v power supply.
Follow my instructions to make a correct code
Here's a detailed explanation of the functional flow of your test booklet vending machine based on the provided code:
- Power-On Sequence
System powers on.
LCD displays: Test Booklet Vending Machine for 1 second.
LCD clears, waits 1 second.
LCD then shows: INSERT COIN!! bal.php: 0.00
- Coin Insertion
When a 10 peso coin is inserted:
An interrupt detects the coin.
Balance increases to 10.0.
LCD updates: INSERT COIN!! bal.php: 10.00
Blue LED turn ON to show coin has been accepted.
- Button Press (User Request)
If the user presses the push button:
System checks if the balance is at least 10.0 and not already processing.
Enters release mode:
Blue LED turns OFF
Green LED turns ON
Buzzer turns ON (indicates paper is being released)
- Stepper Motor Action
Stepper Motor 1 rotates 360° (simulates feeding or grabbing the paper).
Waits 2 seconds.
Stepper Motor 2 rotates 180° (opens or pushes paper out).
After both motors complete:
Green LED turns OFF
Buzzer turns OFF
Red LED turns ON
Wait 1 second, then:
Red LED turns OFF
LCD clears and waits another second.
- Ultrasonic Sensor Checks Ultrasonic Sensor 1:
Continuously checks if paper stock is present.
If no paper:
Red LED blinks for 5 times indicating need to be refilled
Buzzer beeps
System halts releasing until restocked.
Ultrasonic Sensor 2:
Confirms if paper was successfully delivered.
If yes:
LCD shows Done message Delay 1 second lcd clear
Lcd display "thank you bye"
Delay 1 second ,lcd clear Wait another second.
Lcd resets to : Insert coin!! Bal.php: 00.0