Approved content

The content below is provided by a partner.

KittenBot/pxt-joyfrog 0.1.7 GitHub

JoyFrog

Joyfrog is a piece of cute programming hardware that looks like a frog. It is covered by an environmentally friendly silicone case which makes it comfortable to grip and hold. It can be used as a remote control in combination with micro:bit. We designed it this way in order to attract children’s attention with the cute look, so that they can have fun and learn knowledge of programming at the same time.

joyfrog

Feature

intro


Basic usage

    joyfrog.on_btn_pressed(joyfrog.JoyBtns.BTN_UP, function () {
        basic.showArrow(ArrowNames.North)
    })
    joyfrog.on_btn_pressed(joyfrog.JoyBtns.BTN_RIGHT, function () {
        basic.showArrow(ArrowNames.East)
    })
    joyfrog.on_btn_pressed(joyfrog.JoyBtns.BTN_LEFT, function () {
        basic.showArrow(ArrowNames.West)
    })
    joyfrog.on_btn_pressed(joyfrog.JoyBtns.BTN_SPACE, function () {
        basic.showIcon(IconNames.Heart)
    })
    joyfrog.on_btn_pressed(joyfrog.JoyBtns.BTN_DOWN, function () {
        basic.showArrow(ArrowNames.South)
    })
    joyfrog.joyfrog_init()

    joyfrog.on_infra_data(function (data) {
        ir = data
        basic.showString(ir)
    })
    joyfrog.on_btn_pressed(joyfrog.JoyBtns.BTN_A, function () {
        joyfrog.infra_send(ir)
    })
    let ir = ""
    joyfrog.joyfrog_init()

    joyfrog.on_btn_pressed(joyfrog.JoyBtns.BTN_X, function () {
        joyfrog.digi_write(joyfrog.JoyPort.PORT_3, 0)
    })
    joyfrog.on_btn_pressed(joyfrog.JoyBtns.BTN_Y, function () {
        joyfrog.digi_write(joyfrog.JoyPort.PORT_3, 1)
    })
    joyfrog.joyfrog_init()

License

MIT

Supported targets

github:Kittenbot/pxt-joyfrog
joyfrog=github:KittenBot/pxt-joyfrog#v0.1.7