코풀 커뮤니티

OpenCV를 이용한 허수아비 만들어보기 - 문윤성

과제

문*성

2024-12-28

post-image
post-image
post-image
post-image
post-image
post-image
post-image
post-image
post-image

코드에디터

언어 선택
#include <HuemonelabKit.h>

ServoMotor motor;
DotMatrix dot(12, 11, 10);

void setup() {
Serial.begin(9600);
motor.attach(7);
dot.setIntensity(3);
}

void loop() {
if(Serial.available()) {
char cmd = Serial.read();
if (cmd=='a') {
dot.clear();
dot.printEmoji(6);
motor.write(90);
delay(500);
motor.write(0);
} else if (cmd=='b') {
dot.clear();
dot.printEmoji(5);
}
}
}
입력
실행 결과
이 곳에 결과가 표시됩니다.
computerlogo