Skip to content

micro:bit toy gun by ELECFREAKS Apply to infrared laser battle gun toy series

License

Notifications You must be signed in to change notification settings

elecfreaks1/pxt-microbit-toy-gun

 
 

Repository files navigation

micro:bit toy gun kit

This is the toy type educational product produced by ELECFREAKS. It can interact with toys purchased in the market and truly complete learning in play.

This library is designed to drive micro:bit gun kit , You can get this here.

https://www.elecfreaks.com/estore/micro-bit-gun-kit-with-flying-saucer-and-beetle.html

Code Example

toyGunKit.onHit(function () {
    basic.showIcon(IconNames.Sad)
})
toyGunKit.setSendPin(AnalogPin.P1)
toyGunKit.setRecivePin(DigitalPin.P2)
toyGunKit.setFireButton(DigitalPin.P8)
basic.forever(function () {
    if (toyGunKit.openFireButton()) {
        music.playTone(988, music.beat(BeatFraction.Sixteenth))
        toyGunKit.openFire()
    }
})

Supported targets

for PXT/microbit

License

MIT

About

micro:bit toy gun by ELECFREAKS Apply to infrared laser battle gun toy series

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.9%
  • Makefile 0.1%