주요 콘텐츠

이 페이지는 기계 번역을 사용하여 번역되었습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

MATLAB 함수 사용

MATLAB® 함수를 사용하여 BBC micro:bit를 프로그래밍

Simulink® Coder™ Support Package for BBC micro:bit는 BBC micro:bit를 위한 MATLAB 함수를 지원합니다. 이러한 함수를 사용하면 MATLAB을 실행하는 호스트 컴퓨터에서 BBC micro:bit와 통신할 수 있습니다. MATLAB 함수를 사용하면 BBC micro:bit의 센서에서 데이터를 수집하고 BBC micro:bit에 부착된 장치를 작동시킬 수 있습니다.

함수

microbitConnect to BBC micro:bit hardware
readRead data from accelerometer and magnetometer sensors, or read data from an I2C device, connected to BBC micro:bit board
readAccelerationRead data from the accelerometer sensor on BBC micro:bit board
readMagneticFieldRead data from the magnetometer sensor on BBC micro:bit board
writeLEDWrite to BBC micro:bit LED
clearLEDClear the data displayed on the LED on BBC micro:bit
showPinsView an image of BBC micro:bit showing all the pins on the edge connector
configurePinConfigure and display pin modes on BBC micro:bit board
writeDigitalPinWrite to digital pin on BBC micro:bit board
readVoltageRead analog pin voltage on BBC micro:bit board
readDigitalPinRead data from digital pin on BBC micro:bit board
writePWMVoltage Write PWM voltage value on BBC micro:bit board pin
writePWMDutyCycle Set PWM duty cycle on BBC micro:bit board pin
scanI2CBus Scan BBC micro:bit board for I2C device addresses
deviceConnect to device on I2C or SPI bus on BBC micro:bit board
writeWrite data to an I2C device connected to BBC micro:bit board
writeReadWrite and read data from SPI device
readRegisterRead data from I2C device register
writeRegisterWrite data to I2C device register

도움말 항목