> For the complete documentation index, see [llms.txt](https://cavedu.gitbook.io/linkit-7697/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cavedu.gitbook.io/linkit-7697/linkit-7697-development-guide-for-arduino-ide/developer-guide/gpio.md).

# GPIO

LinkIt 7697 supports the core Arduino APIs including:

* [pinMode](https://www.arduino.cc/en/Reference/PinMode)
* [digitalRead](https://www.arduino.cc/en/Reference/DigitalRead)
* [digitalWrite](https://www.arduino.cc/en/Reference/DigitalWrite)

These APIs allow you to control or read the high/low state of digital pins.

However, note that the pin layout is different from Arduino Uno. Please refer to the [pinout diagram](https://labs.mediatek.com/en/download/1ega2lbl) for detailed pin definitions.

### Blink Example

This is the most basic example sketch from the board - blink the onboard **USR** LED. To run the example, follow the below steps:

1. Connect the board to your computer, as instructed in the previous chapter.
2. Select  **LinkIt 7697** from the board: go to **Tools > Board**.
3. Select **Tools > Port:** menu, and then select **COM** ***XYZ*****&#x20;(LinkIt 7697)**. The number ***XYZ***  can be different on each computer. The screenshot below is an example:

![](https://3972650740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY4gduUSLWOCI23CXUWej%2Fuploads%2FrP2EbQXi3xdFlk0f9d9T%2Fboard_port_selection.png?alt=media\&token=4b6dbaae-7821-42b4-b013-90bae4e188ee)

4\. Now select the Blink example from **File > Examples > 01. Basics > Blink**, as shown below:

![](https://3972650740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY4gduUSLWOCI23CXUWej%2Fuploads%2FllYn4AWL7AECzDjPml8Z%2Fblink_example.png?alt=media\&token=77be4911-3c3b-483c-ad68-d12b2b359349)\
\
5.Click the  **Upload**  button on the toolbar, as shown below:

![](https://3972650740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY4gduUSLWOCI23CXUWej%2Fuploads%2Foe5wfjpA2v3AkIoKTeg1%2Fclick_upload.png?alt=media\&token=0345d82d-7cc1-4718-8643-b13c0739db12)

6.It may take some time to compile and upload the sketch. During the uploading process, the board's  **TX**  and  **RX**  LEDs will blink rapidly. Once the uploading completes, the IDE shows `Done uploading.` as shown below:

![](https://3972650740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY4gduUSLWOCI23CXUWej%2Fuploads%2FVbce6qr0qobQ6wlkksS0%2Fdone_uploading.png?alt=media\&token=eda3c20a-74c8-4747-834f-b8733e961742)\
\
7\. The board will automatically reboot, and the **USR** LED should start to blink once every second.

Note that unlike Arduino Uno, the **USR** LED maps to **P7** instead of P13 on the LinkIt 7697 board. Therefore the functional call:

```
digital_write(LED_BUILTIN, HIGH);
```

is equal to:

```
digital_write(7, HIGH); // 7 maps to P7 on LinkIt 7697 board
```

Refer to the [pinout diagram](https://labs.mediatek.com/en/download/1ega2lbl) to find other pin mapping definitions.
