본문 바로가기

Project/Flex Keyboard

20191002

구부림 센서의 값을 받아오는 코드를 짜 보았다.

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이 출력되고 나머지는 계속 변하는 값이 출력된다.

'Project > Flex Keyboard' 카테고리의 다른 글

20191103  (0) 2019.11.03
20191030  (0) 2019.10.30
20180925  (0) 2019.09.26
20180920  (0) 2019.09.20
20190918  (0) 2019.09.18