tl_arduino_wifi_sdk Getting Started
Overview
About this document
This document helps you quickly set up the tl_arduino_wifi_sdk development environment, install the Telink Wi-Fi boards package, build and flash a project, and run the first example.
Applicable scope
The tl_arduino_wifi_sdk applies to Telink ML9118A series modules.
Preparation
Hardware checklist
| Hardware | Description |
|---|---|
| PC | Windows 10/11 or Linux |
| Development board | AIOT_DK2 |
| USB cable | Connects the PC and the development board |
Software checklist
| Software | Description |
|---|---|
| Arduino IDE | Arduino development environment |
| Telink Wi-Fi boards package | Installed through the Arduino IDE; includes the SDK, build toolchain, and components required for development |
Install the Arduino IDE
The tl_arduino_wifi_sdk supports development with the Arduino IDE.
Download and install the version appropriate for your operating system. Download link: https://www.arduino.cc/en/software/

Install the Telink Wi-Fi boards package
The Arduino IDE manages official and third-party board packages through the Boards Manager and supports package installation, version management, and uninstallation. The Telink Wi-Fi boards package includes the SDK, build toolchain, and related development components.
This section describes how to install the Telink Wi-Fi boards package in the Arduino IDE.
Add the Boards Manager URL
Add the Telink Wi-Fi boards package by using an additional Boards Manager URL in the Arduino IDE. Follow these steps:
1. Click File → Preferences... in the menu bar.
2. In the Preferences panel that opens, select the Settings tab.
3. In the Additional boards manager URLs field, paste the following package index URL:
https://doc.telink-semi.cn/arduino/tl_arduino_sdk/package_telink_wifi_index.json
4. Click OK to save the settings.

Install the boards package
After adding the Boards Manager URL, follow these steps to install the boards package:
1. In the Arduino IDE, click the Boards Manager icon on the left side of the IDE.
2. Enter telink in the search box to search for the package.
3. Locate Telink WiFi Boards in the search results and click the INSTALL button to start the installation.

During the installation, view the progress in the Output panel.

After the installation is complete, the Telink WiFi Boards package is displayed as installed.
Build and run the first example
This section guides you through the complete development workflow, from selecting an example and building the code to flashing and running the firmware.
Select the example
Use the official audio_play example as the first example project. It has a simple structure and intuitive operation, allowing you to quickly build, flash, and run the example and verify the basic functions of the development environment and the development board.
Build and flash
Step 1: Connect the hardware
Use the USB cable to connect the PC and the development board.

Step 2: Select the development board in the IDE
1. Open the IDE, click Select Board, and select the serial port corresponding to the development board from the drop-down list.

2. In the Select Other Board and Port window that appears:
(1) Enter aiot in the BOARDS search box and select AIOT_DK2 from the search results.
(2) In the PORTS section, select the serial port corresponding to the development board.
(3) Click the OK button in the lower-right corner to save the configuration.

After the configuration is complete, AIOT_DK2 is displayed instead of Select Board.

Step 3: Open the example
1. In the Arduino IDE, click File → Examples.
2. Locate the Examples for AIOT_DK2 section and click Audio → audio_play.
After the example is opened, the Arduino IDE automatically opens a new window and loads the example code audio_play.ino.

Step 4: Build and flash
In the new window, click the → (Upload) button on the left side of the top toolbar. The IDE automatically builds the code and flashes the firmware to the development board.
A progress notification, such as "Compiling sketch...", appears in the lower-right corner and displays the progress in real time until the flashing is complete.

Info
- In the Arduino IDE, building and flashing are controlled by two buttons on the toolbar:
- The Verify button (icon: ✔) only builds the code to check for compilation errors.
- The Upload button (icon: →) builds the code first and automatically flashes the firmware to the development board after a successful build.
Verify the result
After the flashing is complete, the red, green, and white indicator LEDs on the development board remain lit, and the yellow indicator LED blinks at regular intervals.
Plug headphones into the onboard headphone jack of the development board. The recorded Chinese voice "你好啊" ("Hello") plays in a loop.

You can also use the Serial Monitor tool built into the Arduino IDE to view the software's real-time status. Follow these steps:
1. In the Arduino IDE menu bar, click Tools → Serial Monitor (shortcut Ctrl + Shift + M) to open the Serial Monitor.

2. Click the drop-down box on the far right of the Serial Monitor window and select 115,200 baud.

The Serial Monitor window displays the program's real-time logs.
FAQ
Q1: On Windows, after opening the Arduino IDE and clicking Select Board, the serial port corresponding to the development board is not found.
A1: The device driver must be installed before first use. Download the driver installer, select the installer appropriate for your operating system, and complete the installation. After the installation is complete, reconnect the development board, open the Arduino IDE, click Select Board, and check whether the serial port corresponding to the development board is recognized.

Q2: When testing the audio_play example, sound is played through only one side after the headphones are plugged in.
A2: This issue may be caused by incompatibility between the headphone plug and the jack standard. If it occurs, adjust the insertion position of the headphone plug as needed until sound is played through both sides.

Community and resources
| Resource | Description |
|---|---|
| Telink Official Forum | Technical exchange and support |
| Telink Official Website | Product center and documentation center |
| Gitee/GitHub | SDK source repository |