# pxt-DFRobot_MaqueenPlus_v20 **Repository Path**: dfrobot/pxt-DFRobot_MaqueenPlus_v20 ## Basic Information - **Project Name**: pxt-DFRobot_MaqueenPlus_v20 - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-15 - **Last Updated**: 2024-12-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Maqueen Plus V2 ## Introduction This is the latest version of Maqueen Plus, a programming robot for STEAM education. Optimized with more expansion ports, larger capacity power supply and larger body, the Maqueen Plus V2.0 can be perfectly compatible with more peripheral components like HuskyLens AI camera and Maqueen Mechanic kits, which makes it an accessible STEAM robot teaching tool for primary and secondary students. Besides, it can be not only suitable for classroom teaching, but also can be used for after-school extended exercises and robot competitions. Besides all the functions of Maqueen Lite, it offers richer and more flexible functions and stronger performance. Whether you have ever used Maqueen series products or not, you'll find it very easy to get started. [Purchase link](https://www.dfrobot.com/product-2026.html) [Tutorial Links](https://wiki.dfrobot.com/SKU_MBT0021-EN_Maqueen_Plus_STEAM_Programming_Educational_Robot#target_0) ## Basic usage * forward ```blocks maqueenPlusV2.I2CInit() basic.forever(function () { maqueenPlusV2.controlMotor(maqueenPlusV2.MyEnumMotor.AllMotor, maqueenPlusV2.MyEnumDir.Forward, 100) }) ``` * Backward ```blocks maqueenPlusV2.I2CInit() basic.forever(function on_forever() { maqueenPlusV2.controlMotor(maqueenPlusV2.MyEnumMotor.AllMotor, maqueenPlusV2.MyEnumDir.Backward, 100) }) ``` * Blinking LED ```blocks maqueenPlusV2.I2CInit() music.startMelody(music.builtInMelody(Melodies.Dadadadum), MelodyOptions.Forever) maqueenPlusV2.controlMotor(maqueenPlusV2.MyEnumMotor.AllMotor, maqueenPlusV2.MyEnumDir.Forward, 255) basic.forever(function () {     maqueenPlusV2.setIndexColor(maqueenPlusV2.ledRange(0, 3), maqueenPlusV2.NeoPixelColors.Red)     basic.pause(1000)     maqueenPlusV2.setIndexColor(maqueenPlusV2.ledRange(0, 3), maqueenPlusV2.NeoPixelColors.Blue)     basic.pause(1000) }) ``` * Light Sensing Robot ```blocks maqueenPlusV2.I2CInit() basic.forever(function () {     basic.showNumber(input.lightLevel()) }) ``` * Ultrasonic ```blocks maqueenPlusV2.I2CInit() basic.forever(function () {     basic.showNumber(maqueenPlusV2.readUltrasonic(DigitalPin.P13, DigitalPin.P14)) }) ``` * Line-tracking Robot ```blocks maqueenPlusV2.I2CInit() basic.forever(function () {     if (maqueenPlusV2.readLineSensorState(maqueenPlusV2.MyEnumLineSensor.SensorM) == 1) {         maqueenPlusV2.controlMotor(maqueenPlusV2.MyEnumMotor.AllMotor, maqueenPlusV2.MyEnumDir.Forward, 100)     } else {         if (maqueenPlusV2.readLineSensorState(maqueenPlusV2.MyEnumLineSensor.SensorL1) == 0 && maqueenPlusV2.readLineSensorState(maqueenPlusV2.MyEnumLineSensor.SensorR1) == 1) {             maqueenPlusV2.controlMotor(maqueenPlusV2.MyEnumMotor.LeftMotor, maqueenPlusV2.MyEnumDir.Forward, 160)             maqueenPlusV2.controlMotor(maqueenPlusV2.MyEnumMotor.RightMotor, maqueenPlusV2.MyEnumDir.Forward, 30)         }         if (maqueenPlusV2.readLineSensorState(maqueenPlusV2.MyEnumLineSensor.SensorL1) == 1 && maqueenPlusV2.readLineSensorState(maqueenPlusV2.MyEnumLineSensor.SensorR1) == 0) {             maqueenPlusV2.controlMotor(maqueenPlusV2.MyEnumMotor.RightMotor, maqueenPlusV2.MyEnumDir.Forward, 160)             maqueenPlusV2.controlMotor(maqueenPlusV2.MyEnumMotor.LeftMotor, maqueenPlusV2.MyEnumDir.Forward, 30)         }     } }) ``` ## License MIT Copyright (c) 2020, microbit/micropython Chinese community ## Supported targets * for PXT/microbit ```package maqueenPlusV2=github:DFRobot/pxt-DFRobot_MaqueenPlus_v20 ```