Hi,
It sounds like you wrote your code in one big hit.
Can I suggest you go back to the start and get a servo working first?
Can you post a circuit diagram please?
A hand drawn picture will do, especially include power supplies, component labels and pin names.
What model Arduino are you using?
Tom...
![]()