メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

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

トピック