# Quickstart

Below are some examples of code that you can use to send data from the project you have created to ANTARES.

{% tabs %}
{% tab title="ESP8266(HTTP)" %}
Below is a video tutorial that you can use to send and get data from ANTARES via ESP8266 (HTTP). Please install [this library](https://github.com/antaresdocumentation/antares-esp8266-http) on Arduino IDE.

{% embed url="<https://youtu.be/Eg06Q1HsWdM>" %}

{% code lineNumbers="true" %}

```arduino
#include <AntaresESP8266HTTP.h>

#define ACCESSKEY "your-access-key"
#define WIFISSID "your-wifi-ssid"
#define PASSWORD "your-wifi-password"

#define applicationName "your-application-name"
#define deviceName "your-device-name"

AntaresESP8266HTTP antares(ACCESSKEY);

void setup() {
  Serial.begin(115200);
  antares.setDebug(true);
  antares.wifiConnection(WIFISSID,PASSWORD);
}

void loop() {
  int temp = random(25,30);
  int hum = random(75,90);

  antares.add("temperature", temp);
  antares.add("humidity", hum);

  antares.send(applicationName, deviceName);
  delay(10000);
}
```

{% endcode %}

<figure><img src="/files/7fzSwbOLhwQuxBLEZ0dx" alt=""><figcaption></figcaption></figure>

**Congratulations, you have sent your data to ANTARES.**
{% endtab %}

{% tab title="ESP8266(MQTT)" %}
Please install [this library](broken://spaces/SG57S3sc1YOZETuRdW3k) on Arduino IDE.

{% code lineNumbers="true" %}

```arduino
#include <AntaresESP8266MQTT.h>

#define ACCESSKEY "your-access-key"
#define WIFISSID "your-wifi-ssid"
#define PASSWORD "your-wifi-password"

#define applicationName "your-application-name"
#define deviceName "your-device-name"

AntaresESP8266MQTT antares(ACCESSKEY);

void setup() {
  Serial.begin(115200);
  antares.setDebug(true);
  antares.wifiConnection(WIFISSID,PASSWORD);
  antares.setMqttServer();
}

void loop() {
  int temp = random(25,30) ;
  int hum = random(75,90);

  antares.add("temperature", temp);
  antares.add("humidity", hum);

  antares.publish(applicationName, deviceName);
  delay(5000);
}
```

{% endcode %}

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

**Congratulations, you have sent your data to ANTARES.**
{% endtab %}

{% tab title="NODE JS" %}
Please install antares-http with npm first, make sure npm and NodeJS are installed on CMD (Windows) or Terminal (Linux): More information about Antares for NodeJS can be found at [antares-http npm page](broken://spaces/SG57S3sc1YOZETuRdW3k).

<pre class="language-bash"><code class="lang-bash"><strong>npm init
</strong>npm install antares-http --save
</code></pre>

```javascript
const antares = require('antares-http');

data = {
  temperature: 32,
  humidity: 80,
}
antares.setAccessKey('your-access-key');
antares.send(data, 'your-project-name', 'your-device-name')
.then((response) => {
  console.log(response);
});
```

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

**Congratulations, you have sent your data to ANTARES.**
{% endtab %}

{% tab title="PYTHON" %}
Please install `antares-http` with pip first, make sure pip and Python are installed on CMD (Windows) or Terminal (Linux):

More information about Antares for Python can be found at [interares-http PyPi page](https://pypi.org/project/antares-http/).

```bash
pip install antares-http
```

```python
from antares_http import antares

data = {
    'temperature' : 32,
    'humidity' : 80
}
antares.setAccessKey('your-access-key')
antares.send(data, 'your-project-name', 'your-device-name')
```

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

**Congratulations, you have sent your data to ANTARES.**
{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://docs.antares.id/en/getting-started/quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
