모터 아홉형제 김미현한테 있습니다
010-9102-5848
수요일까지 전 언제든지 학교에 있으니
필요하신 분은 연락하시고 가져가세요
질문에서처럼,
기말과제로 오토마타시간에 모터로 이용해서 움직이게하려고하는데요.
그 때, 필요할 것 같아 소스를 저장하긴했는데 ㅠ
이게 맞는건가요?ㅠㅠㅠ
속도조절하는건 저장이안되있는 것 같은데.
어디에 입력하면 되는건가요?ㅠㅠ
아듀이노 완전 초보라 ㅠㅠㅠㅠ
도움이 필요해요....ㅠㅠㅠㅠㅠㅠㅠㅠㅠ
char val; // Data received from the serial port
int motorPin1 = 3; // Set the pin to analog I/O 3
int motorPin2 = 5; // Set the pin to analog I/O 5
void setup() {
pinMode(motorPin1, OUTPUT); // Set pin as OUTPUT
pinMode(motorPin2, OUTPUT); // Set pin as OUTPUT
Serial.begin(9600); // Start serial communication at 9600 bps
}
void loop() {
if (Serial.available()) { // If data is available to read,
val = Serial.read(); // read it and store it in val
}
if (val == 'H') { // If H was received
digitalWrite(motorPin1, HIGH); // turn the Motor on
digitalWrite(motorPin2, LOW);
} else if(val == 'K'){
digitalWrite(motorPin1, LOW); // turn the Motor on
digitalWrite(motorPin2, HIGH);
}
else {
digitalWrite(motorPin1, LOW); // Otherwise turn Motor OFF
digitalWrite(motorPin2, LOW);
}
}
현재 과사에 있는 아르두이노가 모두 대여중인 상태예요
과제전 준비로 셋다 모두 깜빡했는데, 우리조가 온도센서를 이용한 달력이라서 꼭 아르두이노가 필요한데요,
오프라인으로 구입할 수 있는 곳이나 대여할 수 있는 곳 없을까요?
온라인으로 구입하면 내일 안 올거 같아서요 ㅠㅠ
지금 816오시면 하나 드릴 수 있어요!
연락처를 몰라서 메일로 답장 드리는데... 빨리 보실지... ㅠㅠ