Skip to content

Matrix-Robotics/pxt-MatrixMicro

Repository files navigation

MATRIX Micro controller

The extension allows to control MATRIX Micro on PXT for micro:bit with block-based programming and Python. This library is as a bridge connecting MATRIX Robotics system alongside with micro:bit.

Introduction

MATRIX Micro is an integrated robot controller. Provide to bridge between micro:bit and robotics control. Use MATRIX Micro as the core to easily drive motors to fit various robotics application scenarios!

Basic usage

  • Set Motor to 100% speed
    Matrix.motor(M_PORT.M1, 100);
    Matrix.motor(M_PORT.M2, 100);
  • Set RGB LED
    Matrix.showLED(LED.RGB1, 255, 255, 255);
    Matrix.showLED(LED.RGB2, 255, 255, 255);
  • Get 10-bits analog voltage data from port A1
    Matrix.readADC(A_PORT.A1)
  • Get digital logic from port D2
    Matrix.dread(D_PORT.D2)
  • Set RC Servo Angle to 90
    Matrix.servo(RC_PORT.RC1, 90);
    Matrix.servo(RC_PORT.RC2, 90);
  • Get distance data from port D1
    Matrix.ultrasonic(D_PORT.D1)

Use as Extension

This repository can be added as an extension in MakeCode.

License

MIT

Supported targets

  • for PXT/microbit
MatrixMicro=github:Matrix-Robotics/pxt-MatrixMicro