 # SHIELD­-MD10, VIS SYSTEM,car, tacho meter(spark plug), convert 12V

hi guys! i’m a mechanical engineering student it is so hard to sketching a code to me so i need your guys help …
my project is making VIS System that input is spark plug signal and output is 2 line for operating linear actuator(6’’ Stroke, 22lb Force High Speed Linear Actuator by Firgelli Automations) and i use arduino uno and SHIELD-­MD10(Cytron 10A Motor Driver Shield) to supply 12V, this is a problem if i use only arduino uno maybe i can control using my code but the actuator need a 12V so we use shied to convert 5V to 12V
how to change from pin number 2,3 to MORTOR PIN (A,B) in the shield???

my code

int HP=0;
int LP=0;
int RPMpast=0;
const int RELAY_1_A = 3;
const int RELAY_1_B = 4;
/// 2번은 입력(RPM) 3,4 번은 출력(linear actuator)

void setup() {
pinMode(2,INPUT);
pinMode(RELAY_1_A, OUTPUT);
pinMode(RELAY_1_B, OUTPUT);
Serial.begin(9600);
}

void loop() {
int H = pulseIn(2,HIGH);
int L = pulseIn(2,LOW);

int DC;
DC=(H+L);
int duty;
int Hz=1000000/DC;
int RPM=Hz*60;

if(RPM<=0){

if(H==0 & L==0) RPM=0;
else RPM=RPMpast;
}

if((abs(RPM)-abs(RPMpast))>2000) RPM=RPMpast;

Serial.print("HIGH : “);
Serial.print(H);
Serial.print(”, LOW : “);
Serial.print(L);
Serial.print(” “);
Serial.print(DC);
Serial.print(”, ");
Serial.print(Hz);
Serial.print("Hz RPM : ");
Serial.println(RPM);

if(RPM>7500){
while(RPM>7500){
digitalWrite(RELAY_1_A, LOW);
digitalWrite(RELAY_1_B, HIGH);

delay(50);
digitalWrite(RELAY_1_A, HIGH);
digitalWrite(RELAY_1_B, LOW);

delay(50);
H = pulseIn(2,HIGH);
L = pulseIn(2,LOW);
DC=(H+L);
Hz=1000000/DC;
RPM=Hz*60;
}
RPMpast=RPM;
HP=H;
LP=L;
}

}

void extendActuator(int actuator) {
//Set one relay one and the other off
//this will move extend the actuator
digitalWrite(RELAY_1_A, HIGH);
digitalWrite(RELAY_1_B, LOW);
}

void retractActuator(int actuator) {
//Set one relay off and the other on
//this will move retract the actuator
digitalWrite(RELAY_1_A, LOW);
digitalWrite(RELAY_1_B, HIGH);
}

void stopActuator(int actuator) {
//Set both relays off
//this will stop the actuator in a braking
digitalWrite(RELAY_1_A, LOW);
digitalWrite(RELAY_1_B, LOW); } 