아는곳이 여기뿐이라 올려봅니다.
#include int in1Pin = 12; int in2Pin = 11; int in3Pin = 10; int in4Pin = 9; int sf = 4; int sr = 5; Stepper motor(4096, in1Pin, in2Pin, in3Pin, in4Pin); void setup() { motor.setSpeed(7); pinMode(sf, INPUT); pinMode(sr, INPUT); pinMode(in1Pin, OUTPUT); pinMode(in2Pin, OUTPUT); pinMode(in3Pin, OUTPUT); pinMode(in4Pin, OUTPUT); } void loop() { if(sf, LOW){ int step = 200; motor.step(5000); delay(10000); } if(sr, LOW){ int step = 200; motor.step(-5000);
if 문이 안먹는데 아시는 분은 도움좀 주시면 감사하겠습니다