# Wind Vane

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2F1j0CRxWTHGQUpdAad0Cn%2Fwindvane_direction_robotbit.png?alt=media&#x26;token=7b4e8655-3991-4c13-8eb8-a6233abb460b" alt=""><figcaption></figcaption></figure>

### Building Instructions

{% content-ref url="../weather-station-building-instructions/wind-vane-instructions" %}
[wind-vane-instructions](https://sharinghub-eng.kittenbot.hk/educational-kit-sets/weather-station-educational-kit/weather-station-building-instructions/wind-vane-instructions)
{% endcontent-ref %}

### Hardware Wiring Diagram

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FXCAMFFqMFL41P9rcgPHq%2Fwindvane_wiring_robotbit.png?alt=media&#x26;token=939e75e7-bcc1-427c-bb9d-8cde495dffdd" alt=""><figcaption></figcaption></figure>

### Sample Program

{% hint style="info" %}
Calibrate the grayscale values according to the instructions.
{% endhint %}

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

#### Operating Instructions

1. The Wind Direction will be displayed on the OLED.

### Calibration Procedure

Download the sample program, the OLED Module should display the grayscale value.

Use the included mini compass to point the wind vane needle towards North, then record the value shown on the OLED module, this value is the calibration value for North.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2Fzf9BXrYjxcVxPU8jjdiU%2F20231116_132248.jpg?alt=media&#x26;token=db29c525-68b7-4fdd-8704-c1181d2056e7" alt=""><figcaption></figcaption></figure>

Input the calibration value for North.

{% hint style="info" %}
For example, OLED shows 443 when it is pointing at North, so we input 443 into the program.
{% endhint %}

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2Fz5i6w6pYOrPaQGiPBaH1%2Fimage.png?alt=media&#x26;token=d4be1cd7-14a9-4ac3-889a-311c5432ba40" alt=""><figcaption></figcaption></figure>

Repeat the above steps for the remaining 3 directions.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2F4TbQ0MGZSEYSXNIPQF6u%2Fimage.png?alt=media&#x26;token=945f70bc-48de-4006-b602-c9aa41335983" alt=""><figcaption></figcaption></figure>

When finished, download the program onto Micro:bit again.
