I have been working on this project for work for several months. This is my first project working with Arduinos. I’m Making a machine to dispense glue onto a disk while rotating the disk at the same time to get a consistent bead all the way around. I am using two stepper motors. One to turn a lead screw to dispense the glue and one to turn the disk. I quickly realized that I wasn’t going to be able to control both stepper motors at the same time at different speeds. This is when I decided to add an arduino uno, the mega as master and uno as slave to control the stepper motor that spins the disk. Ive also incorporated Pots to have manual adjust rpm and steps for the motors, as well as an lcd to display the values. My problem comes into play when I try and use the Wire Library. I use the serial monitor to try and diagnose the problem and i figured out that the master code hangs up at “Wiring”. The serial monitor stops and nothing happens after that. I’m not sure how to fix this problem. Does Wire transmission stop the master code from running?
Thank you for your time!
***My code was too long so I attached it as a file as well as my slave code.
Glue_Machine_statemachine.ino (13.2 KB)
Turn_Table_Code.ino (834 Bytes)