BASIC4MCU | 질문게시판 | 답변 : [아두이노 스텝모터]잘되던예제가 갑자기 안됩니다..
페이지 정보
작성자 master 작성일2018-06-11 12:10 조회11,058회 댓글1건
https://www.basic4mcu.com/bbs/board.php?bo_table=gac&wr_id=1710
본문
// MCU BASIC: https://www.basic4mcu.com// DateTime : 2018-06-11 오후 12:10:16// by Ok-Hyun Park//#include <Stepper.h>const int steps_time=2048;Stepper steppermotor(steps_time,11,9,10,8);//void setup(){steppermotor.setSpeed(17);}//void loop(){steppermotor.step( steps_time);delay(3000);steppermotor.step(-steps_time);delay(3000);}
steppermotor.stop();
없는 함수라서 오류가 발생한겁니다.
스텝모터는 신호를 주지 않으면 멈추어 있습니다.
stop() 함수가 필요 없는 것이죠
Functions
Circuits
Examples
- Motor Knob: Control a highly accurate stepper motor using a potentiometer.
- Stepper One Revolution: Turn the shaft one revolution clockwise and one counterclockwise.
- Stepper One Step At A Time: Turn the shaft step by step to check the proper wiring of the motor.
- Stepper Speed Control: Control the stepping speed with a potentiometer.
댓글 1
조회수 11,058레고조합님의 댓글
레고조합 작성일
steppermotor.stop();
이 함수가 전혀 필요없었는 거군요... 어차피 180도 돌도 정지가 되기때문에... 감사합니다