Send AT commands to Wi-Fi modules for connected robotics prototypes.
Open in compiler →/*
Roboda verified Arduino sample 0923
Feature: ESP8266 AT Commands
Generated for online build, classroom practice, and hardware upload testing.
*/
#include <SoftwareSerial.h>
SoftwareSerial wifi(10, 11);
void setup() {
Serial.begin(9600);
wifi.begin(115200);
wifi.println("AT");
}
void loop() {
if (wifi.available()) {
Serial.write(wifi.read());
}
if (millis() % 5000 < 20) {
wifi.println("AT+GMR");
}
}
How it works
Practice this Arduino feature with a verified Roboda sketch.
- Read the constants at the top of the sketch.
- Wire the pins exactly as listed in the pin map.
- Upload or compile once before changing values.
- Change one value at a time and watch Serial Monitor or the output device.
Connections
| Pin | Connect to | Note |
|---|---|---|
| D10 RX, D11 TX | Bluetooth/Wi-Fi module TX/RX crossed | Use voltage division or level shifting when a 3.3V module receives Arduino 5V TX. |