아두이노에 연결할 수 있는 홀센서로 케이블이 포함되어 있습니다.
다음과 같이 아두이노와 연결한 후에, 소스코드를 입력하면 됩니다.
int ledPin = 13; // choose the pin for the LEDint inputPin = 2; // choose the input pin int val = 0; // variable for reading the pin statusvoid setup() { pinMode(ledPin, OUTPUT); // declare LED as output pinMode(inputPin, INPUT); // declare pushbutton as input}void loop(){ val = digitalRead(inputPin); // read input value if (val == HIGH) { // check if the input is HIGH digitalWrite(ledPin, LOW); // turn LED OFF } else { digitalWrite(ledPin, HIGH); // turn LED ON }}특징 (Features) :
동작전압: 3.3V ~ 5V
디지털 인터페이스
응용 예제 (Application Examples) :
메카솔루션 커뮤니티 Mechasolution Wiki, Mechasolution Blog 는 여러가지 정보를 제공합니다.
상품이 장바구니에 담겼습니다.
바로 확인하시겠습니까?
상품이 찜 리스트에 담겼습니다.
바로 확인하시겠습니까?
Copyright © Mechasolution. All rights reserved.









