8000 GitHub - elecfreaks/pxt-microbit-toy-gun: micro:bit toy gun by ELECFREAKS Apply to infrared laser battle gun toy series
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

elecfreaks/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

Contributors 2

  •  
  •  
0