# Arduino Interfacing

Making Connections

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

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

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

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

Here we have connected UART TX(Purple),RX(Grey),GND(Black),VTRANS(Yellow), PWRKEY(Blue) pins of modem to Arduino Uno  RX, TX, GND, 5V, GPIO2/Pin no 2 respectively&#x20;

Make sure you press PWRKEY switch before running the below code or incorporate the PWRKEY activation code before sending AT command. Wait for atleast 30 seconds after module turns on to send any AT command.

Here is a simple code for testing a simple AT command.  This code reads the IMEI number of module which is also printed on it.

```cpp

void setup()
{
  Serial.begin(115200);
  digitalWrite(2,1); // Make PWRKEY low
  delay(1000);
  digitalWrite(2,0); //  Make PWRKEY high
  Serial.println("Initializing...");
  delay(15000);
 
}

void loop()
{
  Serial.println("AT+CGSN");
  while(Serial.available()) 
  {
    Serial.write(Serial.read());//Forward what Software Serial received to Serial Port
  }
  delay(5000);

 
}

```


---

# 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.valetron.com/wiki/products/a7670x-eval/arduino-interfacing.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.
