구부림 센서의 값을 받아오는 코드를 짜 보았다.
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int sV = analogRead(A0);
Serial.println(sV);
}
아두이노 시리얼 플로터로 값을 출력해 보았다. 휨센서가 휨을 감지하면 1023이 출력되고 나머지는 계속 변하는 값이 출력된다.