# Switch Camera Orientation

### MakeCode Programming Tutorial

#### Extension link: [**https://github.com/KittenBot/pxt-koi2**](https://github.com/KittenBot/pxt-koi2)

Search for KOI2 in the search bar, select KOI 2.(KOI 2 has been approved by Microsoft)

<figure><img src="https://686851495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7Bv9xBdKh3R9w6Vp7asd%2Fuploads%2Fl4LAJvAYYE9RTHdxFSja%2FlALPGTO6sYhE8bbNAo7NBVw_1372_654.png?alt=media&#x26;token=fcce3ddf-c398-4075-9248-bba1b14267cd" alt=""><figcaption></figcaption></figure>

The extension will be imported into your project.

### Coding Blocks

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsN6MlwBFbL3P67FzMMyL%2Fuploads%2Fg8gveE0DC4idrYoORQEx%2Fimage.png?alt=media&#x26;token=97b18306-46f0-43d8-8aba-690e1ac10ca3" alt=""><figcaption></figcaption></figure>

### Sample Program

{% hint style="info" %}
Armourbit users need to use the corresponding initialization block
{% endhint %}

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FPGyECwlPd2M3JqUBLDfO%2Fimage.png?alt=media&#x26;token=662ace3f-a8eb-4fbf-8a10-1d9643c88b1e" alt=""><figcaption></figcaption></figure>

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

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

#### Sample Program Operations

1. Press Button A on the Micro:bit to set to Front Camera mode.(Selfie Mode)
2. Press Button B on the Micro:bit to set to Back Camera mode.(Normal Mode)
