2
내 Arduino Uno에 기본적인 문제가 있습니다.
예제 코드는 직렬 포트를 통해 숫자를 가져오고 다시 인쇄해야합니다.내 Arduino 직렬 포트가 왜 반 난수를 제공합니까?
int incomingByte = 0;
void setup() {
Serial.begin(9600);
Serial.println("Hello World");
}
void loop() {
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte, DEC);
}
}
내가 공을 보내, 나는 48
0->48
1->49
2->50
3->51
a->97
b->98
A->65
그래서 왜 나에게 다시 같은 번호를 전송하지 않습니다니까?