# Ambient Light Sensor

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

This is an ambient light sensor, it returns an analog value.

The range of return value is 0-1023, a higher value means a higher brightness reading.

### Specification[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#specification)

* Voltage: 3.3V\~5V
* Type: Analog Sensor
* Interface: 3Pin PH2.0

### Wiring Diagram[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#wiring-diagram)

```
This is an analog module, it can only use P0-P2.(Remove the buzzer jumper when P0 is in use.)
```

#### Robotbit Shield[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#robotbit-shield)

Connect the sensor to Robotbit Shield’s 3Pin port.

![../../\_images/light\_wire2.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/light_wire2.png)

#### Robotbit[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#robotbit)

Connect the sensor to Robotbit’s pin and 3V pin.

![../../\_images/light\_wire1.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/light_wire1.png)

### MakeCode Coding Tutorial[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#makecode-coding-tutorial)

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

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

#### This module can be used with Microbit and Meowbit.[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#this-module-can-be-used-with-microbit-and-meowbit)

**Reading the ambient light level**[****](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#reading-the-ambient-light-level)

#### Microbit:[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#microbit)

![../../\_images/poten\_code.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/poten_code.png)

#### Meowbit:[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#meowbit)

![../../\_images/poten\_codeMeow.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/poten_codeMeow.png)

### KittenBlock Coding Tutorial[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#kittenblock-coding-tutorial)

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

#### Load Robotbit Extension[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#load-robotbit-extension)

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

**Reading the ambient light level**[****](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#id1)

![../../\_images/poten\_codekb.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/poten_codekb.png)

### Mu Editor Coding Tutorial[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#mu-editor-coding-tutorial)

#### Reading the ambient light level[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/ambient.html#id2)

![../../\_images/poten\_codemu.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/poten_codemu.png)
