# Recebimento de Downlink

Esse exemplo irá efetuar o JOIN na Rede LoRaWAN, e obtendo êxito, irá publicar uma mensagem a cada 15 segundos e caso tenha um Downlink para ser recebido, será mostrado no monitor serial a payload juntamente com a porta.

Durante a tentativa de JOIN, o Led RGB piscará na cor vermelho. Caso obtenha êxito, o led piscará na cor azul.

Com o sucesso da conexão, os Uplinks começarão a ser enviados, e durante este processo, o Led RGB piscará na cor Verde, sinalizando o início e o fim do envio.

Assim que o Uplink for enviado e tiver Downlinks para serem recebidos da Rede LoRaWAN, o Led RGB piscará na cor Azul, sinalizando o inicio e o final do recebimento da mensagem.

### Dependências

* [SMW\_SX1262M0](https://github.com/RoboCore/RoboCore_SMW-SX1262M0)
* [Software Serial](https://www.arduino.cc/reference/en/libraries/espsoftwareserial/)

{% hint style="info" %}
Ambas bibliotecas podem ser baixadas dentro da própria IDE através do gerenciador de bibliotecas.
{% endhint %}

### Exemplo

{% embed url="<https://gist.github.com/douglaszuqueto/516e5849a9f9ffdfa3651f3c55ff2271>" %}


---

# 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://devkit-lorawan.douglaszuqueto.com/exemplos/arduino-core/recebimento-de-downlink.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.
