# JoyFrog Coding with MakeCode

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/mcbanner.png)

![](https://kittenbothk.readthedocs.io/en/latest/_images/joyfrog1.png)

#### Load JoyFrog Extension: github.com/KittenBot/pxt-joyfrog

#### Search joyfrog in the search bar.(JoyFrog is verified by Microsoft)

![](https://kittenbothk.readthedocs.io/en/latest/_images/joyfrog_search.png)

#### Blocks for JoyFrog:

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/jf2.png)

#### Using the Analog Stick:

Showing the value of the stick’s position.

{% embed url="<https://makecode.microbit.org/_Ty95YCWwUC3s>" %}

[Sample Program](https://makecode.microbit.org/_Ty95YCWwUC3s)

#### Using the buttons:

Each button can be individually triggered.

{% embed url="<https://makecode.microbit.org/_THaPh5RTVRRt>" %}

[Sample Program](https://makecode.microbit.org/_THaPh5RTVRRt)

#### Using the IO pins.

The Edge Connectors on JoyFrog can be used like a piano.

Try Connecting different conductive objects to create your unique piano!

{% embed url="<https://makecode.microbit.org/_79zhcpKDT9o0>" %}

[Sample Program](https://makecode.microbit.org/_79zhcpKDT9o0)

![](https://kittenbothk.readthedocs.io/en/latest/_images/piano2.png)

You can connect earphones or speakers to the 3.5mm audio jack.

![](https://kittenbothk.readthedocs.io/en/latest/_images/joyfrog_3.5.png)

#### Transmitting an InfraRed signal:

Trasmitting an InfraRed signal on button press.

```
The infrared signals are in a hexadecimal format.
```

{% embed url="<https://makecode.microbit.org/_Wvp6vxiPMLWr>" %}

[Sample Program](https://makecode.microbit.org/_Wvp6vxiPMLWr)

#### Receiving an InfraRed signal:

Displaying the received signal.

```
The infrared signals are in a hexadecimal format.
```

{% embed url="<https://makecode.microbit.org/_DoM9fj6Cj97U>" %}

[Sample Program](https://makecode.microbit.org/_DoM9fj6Cj97U)

#### Analog Read:

Reading analog values.

![](https://kittenbothk.readthedocs.io/en/latest/_images/joyfrogPoten.png)

{% embed url="<https://makecode.microbit.org/_HLtdh2Ha6KMp>" %}

[Sample Program](https://makecode.microbit.org/_HLtdh2Ha6KMp)

#### Analog(PWM) Write:[](https://kittenbothk-eng.readthedocs.io/en/latest/Microbit_eboard/JoyFrog/JoyFrogMC.html#analog-pwm-write)

Writing analog(PWM) values.

![](https://kittenbothk.readthedocs.io/en/latest/_images/joyfrogLED.png)

{% embed url="<https://makecode.microbit.org/_1y8ET7e7A8TF>" %}

[Sample Program](https://makecode.microbit.org/_1y8ET7e7A8TF)

#### Digital Read:

Reading digital values.

![](https://kittenbothk.readthedocs.io/en/latest/_images/joyfrogButton.png)

{% embed url="<https://makecode.microbit.org/_Dd71FegibTs3>" %}

[Sample Program](https://makecode.microbit.org/_Dd71FegibTs3)

#### Digital Write:

Writing digital values.

{% embed url="<https://makecode.microbit.org/_UKU0K75uYcyL>" %}

[Sample Program](https://makecode.microbit.org/_UKU0K75uYcyL)
