> For the complete documentation index, see [llms.txt](https://sharinghub-eng.kittenbot.hk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sharinghub-eng.kittenbot.hk/microsoft-jacdac-series/jacdac-hardware/jacdac-kit-a/jacdac-magnet-sensor.md).

# Jacdac Magnet Sensor

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

This magnet sensor can detect polarity and strength.

### Product Specifications

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

### Wiring

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

### MakeCode Programming

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

#### Sample Program

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

Micro:Bit sounds warning if magnet is detected.

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