Hello. I have no clue what I'm doing for any of my code, and I've never coded anything before. This is for a class and my final project is to make a drink machine. For the base I would like to use a turntable that spins the cup around from the front to the back to fill up and then back to the front.
I found a Tinkercad thing that might work, I think? But the code needs to be changed and I don't know anything about that and I couldn't find anything online.
The VERY FIRST step is to make the turntable and somehow connect it to the motor! The turntable MUST support the cup full of water and be able to either turn 360 degrees in a complete circle or 180 degrees to return to the front.
And when that works, you need to design a way for the program to know where the front is and where the drink dispenser is. And finally a nice feature would be knowing there was a cup on the turntable positioned so it can be filled by the dispenser.
Only then can you consider writing code for the end product.
Look inside a microwave oven, under the glass platter/table... the clever part is the ring of three wheels that support AND roll with the turning platter/table.
And it has a formed track in the metal case under the glass! I doubt the OP is going to the trouble to actually construct such a device. I would consider using a small "lazy Susan" type mount for the turntable. Readily available at hardware stores.