shurik179 / pxt-Maqueenplus

Maqueen Plus is a STEM educational robot for micro:bit. Has been specially optimized in software and hardware for being compatible with Huskylens AI Vision Sensor.

Home Page:https://dfrobot.github.io/pxt-DFRobot-Maqueenplus/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MaqueenPlus

Maqueen plus is a STEM educational robot for micro:bit. Optimized with better power management and larger capacity power supply, it can be perfectly compatible with Huskylens AI Vision Sensor.

Basic usage

  • Control the motor speed and direction; stop motor rotating
DFRobotMaqueenPlus.I2CInit()
DFRobotMaqueenPlus.mototRun(Motors.ALL, Dir.CW, 255)
DFRobotMaqueenPlus.mototStop(Motors.M1)
  • Read the speed and direction of the left/right motor
DFRobotMaqueenPlus.I2CInit()
basic.forever(function () {
    serial.writeValue("speed", DFRobotMaqueenPlus.readSpeed(Motors1.M1))
    serial.writeValue("direction", DFRobotMaqueenPlus.readDirection(Motors1.M1))
})
  • Read the state and greyscale value of the line-tracking sensor
DFRobotMaqueenPlus.I2CInit()
basic.forever(function () {
    serial.writeValue("patorl", DFRobotMaqueenPlus.readPatrol(Patrol.L1))
    serial.writeValue("voltage", DFRobotMaqueenPlus.readPatrolVoltage(Patrol.L1))
})

  • Read IR value and the distance the ultrasound returns
DFRobotMaqueenPlus.I2CInit()
basic.forever(function () {
    serial.writeValue("IR", DFRobotMaqueenPlus.IR_read())
    serial.writeValue("ultrasonic", DFRobotMaqueenPlus.ultraSonic(PIN.P0, PIN.P0))
})

  • Servo control module for controlling 3-way servo
DFRobotMaqueenPlus.I2CInit()
DFRobotMaqueenPlus.servoRun(Servos.S1, 100)

  • RGB LED control module: let Maqueen Plus's RGB LEDs display various colors
DFRobotMaqueenPlus.I2CInit()
DFRobotMaqueenPlus.setRGBLight(RGBLight.RGBL, Color.RED)

License

MIT

Copyright (c) 2018, microbit/micropython Chinese community

Supported targets

  • for PXT/microbit (The metadata above is needed for package search.)

About

Maqueen Plus is a STEM educational robot for micro:bit. Has been specially optimized in software and hardware for being compatible with Huskylens AI Vision Sensor.

https://dfrobot.github.io/pxt-DFRobot-Maqueenplus/

License:MIT License


Languages

Language:C++ 52.1%Language:TypeScript 47.7%Language:Makefile 0.2%