AKBONE 2020에서 터치 센서 단자 사용
용접 훈련 세트입니다.
용접 연습이 끝나면 아두노 호환판으로 즐기세요!
이번에는 기판의 터치 센서 단자를 사용해 보았다.
"용접 트레이닝 키트 AKBONE 2020"
https://qiita.com/nanbuwks/items/8ff1b2c711d58fc6f85a
이른바 터치 센서 단자
이거.

나는 비트의 터치 센서 단자를 모방했다.
왼쪽은 A0, 오른쪽은 GND입니다.
악어 주둥이 집게로 연결 가능합니다.

최대한 GND에 검정색을 연결합니다.
샘플 프로그램
int sensorPin = A0;
int speakerPin = 15;
int onLevel = 3700;
int soundTone = 600;
void setup() {
Serial.begin(115200);
}
void loop() {
pinMode(sensorPin,OUTPUT);
digitalWrite(sensorPin,LOW);
delay(1);
pinMode(sensorPin,INPUT_PULLUP);
delayMicroseconds(50);
pinMode(sensorPin,INPUT);
int value = analogRead(sensorPin);
Serial.println(value);
if ( onLevel > value ){
tone(speakerPin,soundTone);
delay(100);
} else {
noTone(speakerPin);
delay(100);
}
}
센서 단자를 직접 만지면 소리가 난다.int onLevel = 3700;
어떤 것은 반응치의 문턱값이다.이 값보다 낮으면 소리가 울린다.
이것은 몇 개의 AKBONE 2020에서 시도한 수치이니 사용 장면에 따라 변경해 주십시오.
직렬 모니터를 통해 얻은 값을 표시합니다. 이것을 보고 조정하십시오.

사용 예1

비닐판에 알루미늄 박을 붙여 전극을 만들어 보았다.

이것만 건드리면 울린다.
사용 예2
마이크로:비트에 바나나를 연결했는데 바나나가 없어서 사과를 연결해 봤어요.

나는 애플의 꼭지가 절연체라고 생각했지만, 헤타에 연결된 것도 이미 충분한 데이터가 있다.
사용 예3

나는 방금 전의 알루미늄 박을 욕실에 붙였다.수위가 올라가면 뚫려요.
사용 예4

건조 센서

토양이 건조하면 반응이 있을 수 있다.하지만 알루미늄박을 사용하는 센서가 장기화되면 부식된다.실용성을 고려하면 흑연 전극 등을 사용하고 싶다.
사용 예5

비 센서로 0.5mm의 스테인리스강 실로 짜 보았습니다.
물방울이 도착하면 반응이 있을 것이다.
응용 프로그램
소리 대신 LED 줄이 빛을 발하고 계전기를 이동할 수 있습니다!생각해봐!
Reference
이 문제에 관하여(AKBONE 2020에서 터치 센서 단자 사용), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/nanbuwks/items/d9ac26cb0d87ca5568dd텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)