[마이크로비트] 디지털 홀 센서 활용 (아두이노 센서 활용)
아날로그와는 표현 방식이다른 0,1 로 표시되는 마이크로비트 X 아두이노 디지털 홀 센서 입니다.
자석을 가까이 붙였을 때 결과입니다.

자석을 때었을 때 결과입니다.

디지털 홀 센서 설계도 입니다. 아날로그와 비슷합니다.

디지털 홀 센서 자바 스크립트 코드
| 1 2 3 4 5 6 7 8 9 10 11 12 | let sensor = pins.digitalReadPin(DigitalPin.P2) basic.forever(function () {     sensor = pins.digitalReadPin(DigitalPin.P2)     if (sensor == 1) {         pins.digitalWritePin(DigitalPin.P2, 1)     } else {         if (sensor == 0) {             pins.digitalWritePin(DigitalPin.P2, 0)         }     }     basic.showNumber(sensor) }) | 
디지털 홀 센서 블록 코드

 

 HellMaker
 HellMaker



 
		 
				 양재동메이커
 양재동메이커 
				 
				 
				 
				