The voltage switching circuitry on this shield doesn't work properly as it arrives, so you'll have to modify it slightly if you intend it to work as a shield (with SW1 and SW2 set to ON ). The DIP switches are: Switch Function SW1 Connect ESP8266 TX to pin D0 SW2 Connect ESP8266 RX to pin D1 SW3 Enable bootloader mode SW4 Use DFU LED to show serial activity (?) Power is drawn from the
Designed in
Beijing
P.R.China
0 pin (not
Designed in
Beijing
P.R.China
- so if connecting to Pixl.js ensure that unless you plan to power the shield separately.
Using as-is
- Ensure
SW1 and SW2 are
Designed in
Beijing
P.R.China
6 - Connect a jumper lead from the
Designed in
Beijing
P.R.China 7 pin on Designed in
Beijing
P.R.China 8 to Designed in
Beijing
P.R.China
9 on the Arduino header - Connect a jumper lead from the
Moer info $ tech
support Please go
to elecshop.ml 0 pin on Designed in
Beijing
P.R.China 8 to Moer info $ tech
support Please go
to elecshop.ml
2 on the Arduino header
Rewiring
Pixl.jsIf connecting to Pixl.js you should be aware that when if Pixl.js at boot, it'll start using
Arduino ESP8266 WiFi
Shield Version 1.0
by WangTongze
1 as a console device rather than the LCD. To avoid this you'll need to explicitly set the console back to the LCD at boot time:
function onInit() {
Terminal.setConsole();
}
SoftwareNote: your module may not come with ESP8266 AT firmware installed. To fix this, see the . If you're using Pixl.js you can now update the firmware on the ESP8266 module via the
Arduino ESP8266 WiFi
Shield Version 1.0
by WangTongze
2 section of the Web IDE. ClientTo connect to a WiFi access point.
var WIFI_NAME = "WiFi_Name";
var WIFI_PASS = "WPA2_Key";
var wifi;
function getPage() {
require("http").get("http://www.pur3.co.uk/hello.txt", function(res) {
console.log("Response: ",res);
res.on('data', function(d) {
console.log("--->"+d);
});
});
}
function go() {
Serial1.setup(115200,{rx:D0,tx:D1});
wifi = require("ESP8266WiFi_0v25").connect(Serial1, function(err) {
if (err) throw err;
console.log("Connecting to WiFi");
wifi.connect(WIFI_NAME, WIFI_PASS, function(err) {
if (err) throw err;
console.log("Connected");
// Now you can do something, like an HTTP request
getPage();
});
});
}
Access pointTo set up as an access point called
Arduino ESP8266 WiFi
Shield Version 1.0
by WangTongze
3 with password
Arduino ESP8266 WiFi
Shield Version 1.0
by WangTongze
4 that serves up a webpage on address
Arduino ESP8266 WiFi
Shield Version 1.0
by WangTongze
5:
var wifi;
function pageHandler(req, res) {
res.writeHead(200);
res.end("Hello World");
}
function go() {
Serial1.setup(115200,{rx:D0,tx:D1});
wifi = require("ESP8266WiFi_0v25").connect(Serial1, function(err) {
if (err) throw err;
console.log("Connecting to WiFi");
wifi.createAP("ESP123","HelloWorld",5,"wpa2_psk", function(err) {
if (err) throw err;
console.log("Connected!");
require("http").createServer(pageHandler).listen(80);
});
});
}
See for more information on how to use the ESP8266, and the Internet page for more examples of things you can do on Espruino with an Internet connection. Buying
- eBay - the boards mentioned on this page are the ones with the red DIP switch on.
This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know. ESP8266 là một chip tích hợp cao - System on Chip (SoC), có khả năng xử lý và lưu trữ tốt, cung cấp khả năng vượt trội để trang bị thêm tính năng wifi cho các hệ thống khác hoặc đóng vai trò như một giải pháp độc lập. Module wifi ESP8266 V1 cung cấp khả năng kết nối mạng wifi đầy đủ và khép kín, bạn có thể sử dụng nó để tạo một web server đơn giản hoặc sử dụng như một access point. Đầu tiên chúng ta tìm hiểu về con ESP8266 có cấu tạo như nào ? - URXD(RX) — dùng để nhận tín hiệu trong giao tiếp UART với vi điều khiển
- VCC — đầu vào 3.3V
- GPIO 0 — kéo xuống thấp cho chế độ upload bootloader
- RST — chân reset cứng của module, kéo xuống mass để reset
- GPIO 2 — thường được dùng như một cổng TX trong giao tiếp UART để debug lỗi
- CH_PD — kích hoạt chip, sử dụng cho Flash Boot và updating lại module, nối với mức cao
- GND — nối với mass
- UTXD (TX) — dùng để truyền tín hiệu trong giao tiếp UART với vi điều khiển
Sơ đồ kết nối Module ESP8266 V1 với Arduino Uno R3 để điều khiển LED Môi trường thử nghiệm - Trình duyệt Web Cốc Cốc ( tùy chọn) - Window 8.1 Pro ( tùy chọn) - Arduino IDE 1.6.4 (tùy chọn) - Module Wifi ESP8266 V1 - Board Arduino Uno R3 Nạp đoạn code trên và tiến hành chạy thử nghiệm - Lần lượt thực hiện các bước sau để kiểm tra việc điều khiển bật tắt LED 13 thông qua wifi với module ESP8266 |