Hall Magnetic Sensor Module(KY-024): 두 판 사이의 차이

아두위키 : Arduwiki
(Created page with "{{#seo:|title=아두위키 : 아두이노 홀 자기 센서 모듈(KY-024) 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 홀 자기 센서 모듈(KY-024), 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 홀 자기 센서 모듈(KY-024)을 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커수업에 활용가능합니다.}} Fil...")
 
잔글편집 요약 없음
 
1번째 줄: 1번째 줄:
{{#seo:|title=아두위키 : 아두이노 홀 자기 센서 모듈(KY-024) 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 홀 자기 센서 모듈(KY-024), 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 홀 자기 센서 모듈(KY-024)을 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커수업에 활용가능합니다.}}
{{#seo:|title=ArduWiki : Arduino Hall Magnetic Sensor Module (KY-024) Guide|title_mode=append|keywords=Arduino, Computer Science, Maker Learning, Performance Assessment, Hall Magnetic Sensor Module (KY-024), Arduino Project, Capstone Project, Arduino Example Code|description=Introduces how to control a Hall magnetic sensor module (KY-024) using Arduino (basic info, wiring, example code). Useful for computer science and maker classes.}}
[[File:Ky024홀자기대표이미지.jpg|center|class=coders100]]
[[파일:Ky024홀자기대표이미지.jpg|가운데|class=coders100]]
 
The KY-024 is a magnetic sensor module that offers both digital and analog outputs. It features an adjustable sensitivity via a potentiometer.
The KY-024 is a magnetic sensor module that offers both digital and analog outputs. It features an adjustable sensitivity via a potentiometer.



2025년 3월 27일 (목) 16:28 기준 최신판

The KY-024 is a magnetic sensor module that offers both digital and analog outputs. It features an adjustable sensitivity via a potentiometer.

Specifications

  • Operating Voltage: 3.3V ~ 5V
  • Output Type: Digital, Analog

Example Required Hardware

  • Arduino board
  • Jumper cables
  • Hall magnetic sensor module (KY-024)

Connection

Arduino KY-024 Hall magnetic sensor module
A0 AO
D12 DO
3.3V +
GND G

Example Code

The example demonstrates how to read values from the Hall magnetic sensor, outputting them in both analog and digital formats.

const int analogPin = A0;
const int digitalPin = 12;

void setup() {
  pinMode(digitalPin, INPUT);
}

void loop() {
  int valap = analogRead(analogPin);
  int valdp = digitalRead(digitalPin);
  Serial.print(valap);
  Serial.print("\t");
  Serial.println(valdp);
  delay(100);
}

Execution Results

  • When no magnet is present around the module
  • When a magnet is present around the module