> For the complete documentation index, see [llms.txt](https://docs.antares.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.antares.id/contoh-kode-dan-library/arduino-uno/kirim-data-sederhana-ke-antares.md).

# Kirim Data Sederhana ke Antares

Berikut merupakan *source code* untuk menghubungkan Arduino Uno Ethernet Shield dengan Antares menggunakan Arduino IDE.

Setelah Anda selesai melakukan konfigurasi, saatnya membuat kode program untuk mengirim data sederhana ke device pada console Antares yang telah Anda buat sebelumnya. Kode Program dapat Anda dapatkan di direktori example pada folder library Antares Ethernet Shield yang telah Anda download sebelumnya atau dengan mudah Anda dapatkan dengan klik **File > Examples > AntaresEthernetShield > Send\_Data** pada Arduino IDE.

Kode program AntaresEthernetShield seperti berikut. Jangan lupa untuk ketik Access Key applicationname dan Device Id yang Anda gunakan pada console Antares akun Anda. Setelah itu upload program dan tunggu beberapa detik.

{% code lineNumbers="true" %}

```c
#include "AntaresEthernetShield.h"

#define ACCESSKEY "your-access-key"
#define applicationName "your-application-name"
#define deviceName "your-device-name"

unsigned int counter =0;

AntaresEthernetShield antares(ACCESSKEY);

void setup() {
Serial.begin(9600);
antares.StartConnection();
}
void loop() { 
String text ="Hello! ";
text += String(counter);
counter++;
antares.sendData(text, applicationName, deviceName);
delay(10000);
}            
```

{% endcode %}

Setelah proses upload kode program selesai, silahkan periksa data yang masuk pada Device Antares yang telah Anda buat sebelumnya. Jika berhasil maka tampilan pada Device Anda akan seperti berikut ini:

<figure><img src="/files/YcGz4k2RGecx8ZWRsBb9" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.antares.id/contoh-kode-dan-library/arduino-uno/kirim-data-sederhana-ke-antares.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
