WiFiボードESP-Wroom-02
写真奥から、
| GND | GND |
| IO0 | 10kΩ抵抗経由で3.3V |
| IO2 | 未接続 |
| EN | 10kΩ抵抗経由で3.3V |
| RST | 10kΩ抵抗経由で3.3V |
| TXD | ArduinoのRx |
| RXD | ArduinoのTx |
| 3V3 | 3.3V |
SSID MeoBankSD_pbl パスワード Wikiのパスワードと同じ
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Goodnight moon!");
// set the data rate for the SoftwareSerial port
mySerial.begin(115200);
mySerial.println("Hello, world?");
}
void loop() { // run over and over
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}
シリアルモニタを開き
Goodnight moon! Hello, world?
と表示されることを確認し、モニタの上の入力欄に、
AT+UART_DEF=9600,8,1,0,0
と入力して、送信ボタンをクリックする。