Hi, im doing c code for my project and after done verify the done, i try to upload it to my arduino uno board. But it didn't work, My circuit have 3 input and 3 output. 3 Push button and another 3 is LED,Buzzer and Servo Motor. I try to fix the problem but i didn't manage to find it. I attached the code below. Please help me.
You need to describe what it was suppose to due and then what it actually did.
When you define the value for some of the pins,
int pos = 0;
int LED = 12; // do you actually mean 13? The reason I ask, is that The Arduino has a LED connected to pin 13;
int BUZZER = 8;
int BUTTON1 = 4;
int BUTTON2 = 7;
You might want to actually use these declared values for something. Like this:
void setup ()
Instead of hardcoding the pin numbers. It is easier to understand: