Skip to content

(DIY夹子无人机)XG DIY Drone is a drone that can be programmed and controlled using micro:bit.

License

Notifications You must be signed in to change notification settings

elecfreaks/pxt-dg-drone

Repository files navigation

XG DIY Drone Package

XG DIY Drone is an unmanned aerial vehicle jointly developed by XG and ELECFREAKS, which is compact and flexible in appearance. The functional parameters of XG DIY Drone have been opened, and when used with micro:bit, it will bring you endless imagination and creative space. It is a good tool for learning programming and drones.

This extension is designed to programme and drive the XG171-Drone, You can get XG171-Drone from here., And you can refer to this wiki

Code Example

input.onButtonPressed(Button.A, function () {
    XG171_DRONE.moveAction(XG171_DRONE.Directionoptions.Forward, 50)
})
input.onButtonPressed(Button.AB, function () {
    XG171_DRONE.loading()
})
input.onButtonPressed(Button.B, function () {
    XG171_DRONE.rollAction(XG171_DRONE.Rolloptions.Roll_back, 1)
})
XG171_DRONE.setSerialPort(SerialPin.P1, SerialPin.P2)
XG171_DRONE.setWorkMode(XG171_DRONE.WorkMode.Normalmode)
XG171_DRONE.setHorizontalSpeed(50)
XG171_DRONE.setVerticalSpeed(50)
XG171_DRONE.setFlightAltitude(100)
XG171_DRONE.takeoff(100)
basic.pause(5000)

Supported targets

for PXT/microbit

License

MIT

About

(DIY夹子无人机)XG DIY Drone is a drone that can be programmed and controlled using micro:bit.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages