About Us About Embedded Introduce Editorial Contributions Location Document Android Application Embedded Linux Processor Arduino AVR Devices Resource Android Application Embedded Linux Processor Arduino AVR Devices Education 교육과정안내 교재 프로젝트 자료실 Reference Community 공지사항 제품광고 구인광고
서보모터 제어하기 for 문 0~180도 반복하기 작성자 임베디드코리아 작성일25-05-16 00:08 조회200회 댓글0건 첨부파일 Servo_for.ino (281byte) 0회 다운로드 DATE : 2025-05-18 12:38:03 이전글 다음글 목록 <* 서보모터 0~180도 반복하기 - for 문 *> - for문을 활용한 각도 제어 ---- < for 문을 이용한 각도 변환 소스 코드 > ------------------------ #include <Servo.h> Servo servo_A; void setup() { servo_A.attach(3); } void loop() { for(int angle = 0; angle <= 180; angle++) { servo_A.write(angle); delay(10); } for(int angle = 180; angle >= 0; angle--) { servo_A.write(angle); delay(10); } } 이전글 다음글 목록