센서 값을 직접 모아 만드는 나만의 AI 자료Build your own AI data from real sensor values

마이크로비트 데이터 Lab (1대 단독 수집 모드)micro:bit Data Lab (Single Board Mode)

마이크로비트 1대를 착용하고 걷기·점프 등 나만의 동작 데이터를 수집하여 32특징 kNN 인공지능 모델을 제작하고 테스트합니다.Wear 1 micro:bit to collect movement data, train a 32-feature kNN AI model, and test it in real time.

🟢 현재 모드: 1대 단독 수집 (1대 필요)🟢 Current Mode: 1-Board Single Mode (1 Board)

💡 1대 단독 센서 모드 안내: 손목, 발목, 허리 중 원하는 한 부위에 마이크로비트 1대를 착용하고 Bluetooth 또는 USB로 연결하여 동작을 수집합니다. 단일 부위의 3축 가속도 움직임을 인식하는 데 가장 적합합니다. 💡 1-Board Mode: Wear 1 micro:bit on wrist, ankle, or waist and connect via Bluetooth/USB to collect single-point movement data.

⚙️

처음 한 번: 연결 방식에 맞는 프로그램 설치 (Bluetooth 또는 USB)First Time: Install Firmware (Bluetooth or USB)

마이크로비트에 전용 프로그램이 없다면 설치 마법사를 열어 USB로 바로 설치하세요.If your micro:bit is unprogrammed, open the wizard to install via USB.

1단계Step 1

마이크로비트 연결 및 실시간 센서 확인Connect micro:bit & Live Stream

Bluetooth 또는 USB Serial로 마이크로비트를 연결하고 실시간 X·Y·Z 가속도 파형을 확인하세요.Connect your micro:bit and check live X/Y/Z acceleration stream.

아직 연결하지 않았습니다.Not connected yet.

현재 데이터 입력: 연결 대기. USB 케이블을 꽂는 것만으로 USB 수집이 시작되지는 않습니다.Current data input: waiting for a connection. Plugging in a USB cable alone does not start USB collection.

X
Y
Z

요청 주기 20ms · 수신 표본 0개Requested every 20 ms · 0 samples received

실시간 3축 가속도 모니터 (ml-machine 스타일 광폭 와이드 뷰)Live 3-Axis Acceleration Monitor (Full-width View)
2단계Step 2

동작별 데이터 수집 (클래스 카드)Collect Movement Data

각 동작 카드 안의 '누르는 동안 수집' 버튼을 누르거나 마이크로비트 A버튼을 눌러 표본을 모으세요. (동작당 6~12개 이상 권장)Hold the button in each card or press micro:bit A button to collect samples.

🎵 마이크로비트 A버튼 & 비프음 카운트다운 안내:🎵 Button A & Countdown Sound Guide:
  • 컴퓨터에서 멀리 떨어져 있어도 착용한 마이크로비트의 A 버튼을 누르면 3초 카운트다운 비프음(삐- 삐- 삐- 삐---!)과 함께 수집이 시작됩니다.Pressing Button A starts the 3s countdown with beeping sounds before recording.
  • 동작이 끝난 후 다시 A 버튼을 누르면 완료 사운드(띠리링~)와 함께 데이터 수집이 즉시 종료되고 안전하게 저장됩니다.Pressing Button A again immediately stops and saves the recording.

3단계Step 3

AI 모델 학습 및 과학적 검증 (kNN)Train & Evaluate AI Model

수집된 표본 전체를 데이터 누수 없이 분리 검증하고, 나만의 32특징 kNN 인공지능 모델을 학습합니다.Train your 32-feature kNN AI model with strict whole-recording evaluation.

동작을 2개 이상 만들고, 동작마다 표본을 최소 6개 이상 수집하세요.Collect at least 6 samples for 2 or more movements.

4단계Step 4

실시간 동작 판정 (Live Prediction) & 모델 테스트Live Model Test & Export

학습된 AI 모델로 마이크로비트의 움직임을 실시간 분류하고, 내 프로젝트에 탑재할 파일과 종합 자료를 다운로드하세요.Test real-time predictions and export AI bundle for your web projects.

1️⃣ 센서 실시간 입력 파형1️⃣ Live Sensor Input
X: Y: Z:

💡 마이크로비트를 움직여 가속도 파형이 실시간으로 입력되는지 확인하세요.💡 Move the micro:bit to see live acceleration signals.

🧠 실시간 AI 모델 동작 판별🧠 Live AI Classification ⚡ 250ms 실시간 추론⚡ 250ms Live Inference

Step 3에서 모델을 학습하면 이곳에 실시간 동작 분류 결과와 모든 동작별 확률이 표시됩니다.Train a model in Step 3 to see live predictions and class probability meters here.

내 웹 프로젝트 및 교육 자료 다운로드Export Project & Data Bundle

🎓

다운로드한 파일은 어디서 어떻게 활용하나요?How to use each downloaded file in projects?

가장 추천 · 웹 프로젝트Recommended · Web
📦 AI 종합 ZIP 파일

model.json + runtime.js + index.html 스타터 템플릿이 한 번에 들어있습니다. 압축을 풀고 index.html을 더블 클릭하면 브라우저에서 바로 마이크로비트 AI 모션 인터랙션을 실행할 수 있습니다.Includes model, standalone runtime, and starter template. Unzip and open index.html in any browser.

AI 바이브 코딩 · 웹 코딩Vibe Coding · Web
🧠 최종 모델 JSON (model.json)

ChatGPT, Claude, Cursor 또는 이지웹 AI 채팅에 다음과 같이 요청하여 10초 만에 게임을 만들어보세요:Prompt ChatGPT/Claude with your model.json to generate interactive games:

"내가 micro:bit 점프/걷기 AI 모델(model.json)을 만들었어. 이 모델로 캐릭터를 점프시키고 달리는 인터랙티브 HTML5 게임 웹페이지를 만들어줘!"
엔트리 파이썬 & PythonEntry Python & Python
🧩 엔트리(Entry) & 파이썬 연동

엔트리 파이썬 모드 또는 일반 Python 환경에서 json.load()로 모델 파일을 읽어, 시리얼 통신으로 들어오는 마이크로비트 가속도 값을 kNN으로 분류하고 엔트리 오브젝트를 움직일 수 있습니다.Load model in Entry Python or standard Python to classify motions and control Entry sprites.

엑셀 · 데이터 과학 탐구Excel · Data Science
📊 센서 CSV & 백업 JSON

Excel이나 구글 스프레드시트, 파이썬 Pandas로 원본 가속도 시계열 데이터를 불러와 그래프를 그리고 과학 탐구 보고서나 데이터 분석 보고서를 작성할 수 있습니다.Open in Excel or Google Sheets for time-series charts, statistics, and scientific reports.

기록에서 실제 웹 상호작용까지From recordings to real web interaction

AI 자료를 활용하는 순서How to use your AI learning data

이 페이지는 정답을 자동으로 보장하는 도구가 아닙니다. 같은 조건에서 모은 여러 표본으로 먼저 확인하고, 충분히 믿을 만한 경우에만 웹 프로젝트에 연결하세요.This page does not automatically guarantee a correct answer. First check several samples collected under the same conditions, then connect the model to a web project only when its evidence is trustworthy.

  1. 1

    연결과 값을 먼저 확인Verify connection and values first

    설치한 프로그램에 맞춰 Bluetooth 또는 USB로 연결한 뒤 X·Y·Z가 움직임에 따라 바뀌는지 봅니다. Bluetooth 서비스가 없으면 Bluetooth 테스트 .hex를 USB로 설치하고, USB 수집을 하려면 USB 센서 .hex를 설치합니다.Connect by Bluetooth or USB to match the installed program, then confirm that X/Y/Z change as you move. Install the Bluetooth test .hex for Bluetooth service, or the USB sensor .hex for USB collection.

  2. 2

    동작마다 고르게 표본 모으기Collect balanced samples for each movement

    Bluetooth와 최신 USB 센서 프로그램 모두 A로 시작·종료, B로 저장, A+B로 안전 삭제를 지원하며 화면 버튼도 같은 일을 합니다. 최소 6개는 모델 생성 조건이고 실제 활용 전에는 동작마다 12개 이상을 권장합니다. 손의 궤적이나 리듬이 뚜렷이 다른 동작(펀치 vs 박수 vs 흔들기)이 가장 잘 구분되며, 움직임이 90% 이상 똑같은 유사 동작은 하나의 라벨(예: 달리기)로 묶어 수집하는 것이 좋습니다.Both Bluetooth and the current USB sensor program support A to start/finish, B to save, and A+B for safe deletion. Motions with distinct trajectories (Punch vs Clap vs Shake) separate best; combine nearly identical motions into a single label (e.g. Running).

  3. 3

    평가와 최종 모델을 구분Separate evaluation from the final model

    선택 표본으로 평가는 아직 보지 않은 기록에서 얼마나 구분되는지 확인합니다. 결과가 납득될 때만 최종 모델을 만드세요. 정확도와 Macro F1은 참고 자료이며, 수업·사람·환경이 바뀌면 다시 확인해야 합니다.Evaluation checks how well the model separates records it did not see during training. Create a final model only when the result makes sense. Accuracy and Macro F1 are evidence, not guarantees; check again when class, person, or environment changes.

  4. 4

    필요한 방식으로 내보내고 연결Export and connect in the form you need

    최종 모델 JSON은 프로젝트 작업 화면의 파일 추가 → 마이크로비트 AI 파일에서 명시적으로 추가합니다. 학습 자료 ZIP은 원본·특징·Entry용 CSV와 모델 카드 확인용입니다. 어느 경우에도 이지웹이 기존 index.html이나 학생 코드를 자동으로 바꾸지 않습니다.Add the final model JSON explicitly through Add File → micro:bit AI Files in the project workspace. The learning-data ZIP is for inspecting raw/feature/Entry CSV files and the model card. EasyWeb never changes existing index.html or student code automatically.

연결이 안 될 때If connection does not work

데스크톱 Chrome·Edge의 HTTPS 웹페이지 또는 이지웹 Electron 앱에서 먼저 사용하세요. Bluetooth가 꺼져 있거나 micro:bit에 Bluetooth 서비스가 포함되지 않았다면 장치 선택 뒤에도 연결할 수 없습니다. `.hex` 설치는 Bluetooth가 아니라 USB 연결에서만 합니다.Start with the HTTPS site in desktop Chrome or Edge, or the EasyWeb Electron app. If Bluetooth is off or the micro:bit program lacks the Bluetooth service, connection cannot finish after device selection. Install .hex files through USB, not Bluetooth.

file:// 주소에서는 열지 마세요. 보안상 JavaScript와 Bluetooth가 차단됩니다. 이지웹 앱에서 열거나 http://127.0.0.1:3000/microbit-data.html, 배포된 HTTPS 주소로 여세요.Do not open this page from a file:// address. Browser security blocks JavaScript and Bluetooth. Open it in the EasyWeb app, at http://127.0.0.1:3000/microbit-data.html, or from the deployed HTTPS site.

마이크로비트 연결 안내 보기Read the micro:bit connection guide
권장값으로 시작하고 필요할 때만 조절Start with recommended values and adjust only when needed

AI 모델 고급 설정Advanced AI model settings

각 항목을 눌러 설명과 그림을 먼저 확인하세요. 여기에서 값을 바꾸어도 ‘적용하고 다시 평가하기’를 누르기 전에는 현재 모델과 평가 결과가 바뀌지 않습니다.Open each item to read its explanation and diagram. Changes here do not affect the current model or evaluation until you apply them.

센서 분석 구간 (Sliding Window, 한 번에 볼 시간 길이)Sensor analysis window (Window Size)Window Size1초 · 권장

AI가 한 번의 동작을 판단할 때 살펴보는 연속된 센서 데이터의 시간 길이입니다. 기록 전체 시간이나 시작 전 대기 시간이 아닙니다. 20ms마다 값을 받으면 0.5초는 약 25개, 1초는 약 50개, 2초는 약 100개의 X·Y·Z 값을 분석합니다.The consecutive span of sensor data used for one decision. It is not the total recording time or a delay before recording. At 20 ms per reading, 0.5 s contains about 25 readings, 1 s about 50, and 2 s about 100.

AI가 살펴보는 시간 구간Time span examined by AI

k-최근접 이웃 수 (k-Nearest Neighbors, 다수결로 물어볼 표본 개수)k-Nearest Neighbors (k-Value)Number of Neighbors (k)3개 · 권장

새 동작과 특징이 가장 비슷한 학습 표본을 몇 개까지 찾아 다수결로 판단할지 정합니다. 적으면 반응이 민감하고, 많으면 잡음에는 안정적이지만 서로 비슷한 동작의 경계가 흐려질 수 있습니다. 동점을 피하기 위해 홀수만 제공합니다.Controls how many closest training samples vote on a new movement. Fewer neighbors react more sensitively; more neighbors can resist noise but blur similar movements. Only odd values are offered to reduce ties.

★ 새 동작과 가까운 표본이 투표Nearby samples vote on the new movement

판정 신뢰도 임계값 (Confidence Threshold, 동작 인정 최소 일치율)Confidence Threshold (Agreement Cutoff)Agreement Threshold0.80 · 권장

가까운 표본들이 얼마나 같은 동작에 동의해야 결과를 인정할지 정합니다. 이것은 확률이나 정확도가 아닙니다. 기준을 충족하지 못하면 가장 가까운 동작으로 억지 분류하지 않고 ‘알 수 없음’으로 처리합니다.Controls how strongly nearby samples must agree before a result is accepted. This is not a probability or accuracy score. Below the requirement, the result becomes Unknown instead of being forced into a known movement.

0.80

결과 갱신 간격 (Prediction Interval, 실시간 판정 반복 주기)Prediction Interval (Evaluation Cycle)Prediction Interval0.25초 · 권장

센서 값을 계속 받는 동안 AI가 몇 초마다 새 결과를 계산할지 정합니다. 센서 분석 구간과는 다른 값입니다. 1초 구간을 분석하면서도 0.25초마다 구간을 조금씩 옮겨 새 결과를 낼 수 있습니다.Controls how often a new result is calculated while sensor data keeps arriving. It is different from Window Size: a one-second window can slide forward and produce a new result every 0.25 seconds.