int A_Input=3;int B_Input=4;int C_Input=5;int A_Enable=6;int B_Enable=7;int C_Enable=8;int Button_1=10;int Button_2=11;int Flag=0.0;int Inc_Speed_Latch=0;int Dec_Speed_Latch=0;int Speed=0;void setup() {  // put your setup code here, to run once:  Serial.begin(9600);  pinMode(A_Input,OUTPUT);  pinMode(B_Input,OUTPUT);  pinMode(C_Input,OUTPUT);  pinMode(A_Enable,OUTPUT);  pinMode(B_Enable,OUTPUT);  pinMode(C_Enable,OUTPUT);  pinMode(Button_1,INPUT);  pinMode(Button_2,INPUT);}void loop() {  // put your main code here, to run repeatedly:int Inc_Speed;int Dec_Speed;Serial.print(Speed);Inc_Speed=digitalRead(Button_1);Dec_Speed=digitalRead(Button_2);if(Dec_Speed == 0){  Dec_Speed_Latch = 0;}if(Inc_Speed == 0){  Inc_Speed_Latch = 0;}if(Flag>=6){  Flag=Flag-6;}if(Flag<=-1){  Flag=5;}if((Inc_Speed )&& (Inc_Speed_Latch == 0)){  Speed=Speed+Inc_Speed;  Inc_Speed_Latch = 1;}if((Dec_Speed) && (Dec_Speed_Latch == 0)){  Speed=Speed-Dec_Speed;}if(Speed==0){          digitalWrite(A_Input,0);          digitalWrite(A_Enable,0);          digitalWrite(B_Input,0);          digitalWrite(B_Enable,0);          digitalWrite(C_Input,0);          digitalWrite(C_Enable,0);}if(Speed>0){switch(Flag){  case 0: digitalWrite(A_Input,1);          digitalWrite(A_Enable,1);          digitalWrite(B_Input,0);          digitalWrite(B_Enable,0);          digitalWrite(C_Input,0);          digitalWrite(C_Enable,1);          Flag++;          delay(1000/Speed);          break;  case 1: digitalWrite(A_Input,0);          digitalWrite(A_Enable,0);          digitalWrite(B_Input,1);          digitalWrite(B_Enable,1);          digitalWrite(C_Input,0);          digitalWrite(C_Enable,1);          Flag++;          delay(1000/Speed);          break;  case 2: digitalWrite(A_Input,0);          digitalWrite(A_Enable,1);          digitalWrite(B_Input,1);          digitalWrite(B_Enable,1);          digitalWrite(C_Input,0);          digitalWrite(C_Enable,0);          Flag++;          delay(1000/Speed);          break;  case 3: digitalWrite(A_Input,0);          digitalWrite(A_Enable,1);          digitalWrite(B_Input,0);          digitalWrite(B_Enable,0);          digitalWrite(C_Input,1);          digitalWrite(C_Enable,1);          Flag++;          delay(1000/Speed);          break;  case 4: digitalWrite(A_Input,0);          digitalWrite(A_Enable,0);          digitalWrite(B_Input,0);          digitalWrite(B_Enable,1);          digitalWrite(C_Input,1);          digitalWrite(C_Enable,1);          Flag++;          delay(1000/Speed);          break;  case 5: digitalWrite(A_Input,1);          digitalWrite(A_Enable,1);          digitalWrite(B_Input,0);          digitalWrite(B_Enable,1);          digitalWrite(C_Input,0);          digitalWrite(C_Enable,0);          Flag++;          delay(1000/Speed);          break;}}if(Speed<0){switch(Flag){  case 0: digitalWrite(A_Input,1);          digitalWrite(A_Enable,1);          digitalWrite(B_Input,0);          digitalWrite(B_Enable,0);          digitalWrite(C_Input,0);          digitalWrite(C_Enable,1);          Flag--;          delay(1000/Speed);          break;  case 1: digitalWrite(A_Input,0);          digitalWrite(A_Enable,0);          digitalWrite(B_Input,1);          digitalWrite(B_Enable,1);          digitalWrite(C_Input,0);          digitalWrite(C_Enable,1);          Flag--;          delay(1000/Speed);          break;  case 2: digitalWrite(A_Input,0);          digitalWrite(A_Enable,1);          digitalWrite(B_Input,1);          digitalWrite(B_Enable,1);          digitalWrite(C_Input,0);          digitalWrite(C_Enable,0);          Flag--;          delay(1000/Speed);          break;  case 3: digitalWrite(A_Input,0);          digitalWrite(A_Enable,1);          digitalWrite(B_Input,0);          digitalWrite(B_Enable,0);          digitalWrite(C_Input,1);          digitalWrite(C_Enable,1);          Flag--;          delay(1000/Speed);          break;  case 4: digitalWrite(A_Input,0);          digitalWrite(A_Enable,0);          digitalWrite(B_Input,0);          digitalWrite(B_Enable,1);          digitalWrite(C_Input,1);          digitalWrite(C_Enable,1);          Flag--;          delay(1000/Speed);          break;  case 5: digitalWrite(A_Input,1);          digitalWrite(A_Enable,1);          digitalWrite(B_Input,0);          digitalWrite(B_Enable,1);          digitalWrite(C_Input,0);          digitalWrite(C_Enable,0);          Flag--;          delay(1000/Speed);          break;}}}