pxt-DFRobot_MaqueenPlus_v20

所属分类:教育系统应用
开发工具:TypeScript
文件大小:0KB
下载次数:0
上传日期:2024-01-30 06:40:29
上 传 者sh-1993
说明:  这是最新版本的Maqueen Plus,一个用于STEAM教育的编程机器人。
(This is the latest version of Maqueen Plus, a programming robot for STEAM education.)

文件列表:
_locales/
Gemfile
LICENSE
Makefile
_config.yml
icon.png
maqueenPlusV2.ts
pxt.json
test.ts
tsconfig.json

# 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(functionon_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 ```

近期下载者

相关文件


收藏者