Skip to content

Latest commit

 

History

History
87 lines (61 loc) · 2.1 KB

README.md

File metadata and controls

87 lines (61 loc) · 2.1 KB

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

  • Simple control of JoyFrog
    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()


  • Infrared remote control signal sending and receiving
    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()


  • IO Port control
    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

  • for PXT/microbit (The metadata above is needed for package search.)
github:Kittenbot/pxt-joyfrog