Skip to content

DFRobot/pxt-maqueen

Repository files navigation

Maqueen

Maqueen is an easy-to-use programming educational Robot

Basic usage

  • Set the direction and speed of Maqueen motor
 maqueen.motorRun(maqueen.Motors.M1, maqueen.Dir.CW, 120)
 maqueen.motorRun(maqueen.Motors.M2, maqueen.Dir.CCW, 120)
  • Read ultrasonic sensor
basic.showNumber(maqueen.Ultrasonic(PingUnit.Centimeters))
  • Set the Maqueen servos
maqueen.servoRun(maqueen.Servos.S1, 90)
  • Stop the Maqueen motor
maqueen.motorStop(maqueen.Motors.M1)
  • Read line tracking sensor
serial.writeNumber(maqueen.readPatrol(maqueen.Patrol.PatrolLeft))
  • Turn on/off the LEDs
maqueen.writeLED(maqueen.LED.LEDLeft, maqueen.LEDswitch.turnOn)
  • Read IR sensor value
basic.showNumber(maqueen.IR_read())
  • Read the version number
basic.showString(maqueen.IR_read_version())

License

MIT

Copyright (c) 2018, microbit/micropython Chinese community

Supported targets

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