# MeowBit’s Light Sensor

Meowbit has a built-in light intensity sensor, allowing it to detect environment brightness.

### MakeCode Arcade Coding Tutorial

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

#### Load Controller Extension

#### [Loading Extensions](https://sharinghub-eng.kittenbot.hk/programming-platforms/makecode-tutorial/kittenbot-and-makecode)

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

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

#### Blocks for Controller Extension

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

#### Detecting Brightness

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

[Sample Code Link](https://makecode.com/_EUyfs590PdhJ)

#### Detecting Light Intensity

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

```
The light intensity has a range from 0 to 255.
```

[Sample Code Link](https://makecode.com/_VbYeA6apKPd0)

### Kittenblock Coding Tutorial

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

#### Blocks for onboard sensors

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

#### Detecting Light Intensity

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