Page 145 - MDP2022-3
P. 145
int swG_State = 0;
int swB_State = 0;
int swR_State = 0;
int swL_State = 0;
int swA1_State = 0;
int swA2_State = 0;
int swA3_State = 0;
int swA4_State = 0;
int swA5_State = 0;
int swG_PreState = 0;
int swB_PreState = 0;
int swR_PreState = 0;
int swL_PreState = 0;
int swA1_PreState = 0;
int swA2_PreState = 0;
int swA3_PreState = 0;
int swA4_PreState = 0;
int swA5_PreState = 0;
void setup() {
pinMode(swG , INPUT);
pinMode(swB , INPUT);
pinMode(swR , INPUT);
pinMode(swL , INPUT);
pinMode(swA1 , INPUT);
pinMode(swA2 , INPUT);
pinMode(swA3 , INPUT);
pinMode(swA4 , INPUT);
pinMode(swA5 , INPUT);
Serial.begin(9600);
HC06.begin(9600);
Serial.print("Tank_Master_arduino RUN");
}
void loop() {
swG_State = digitalRead(swG);
swB_State = digitalRead(swB);