文章目錄
- 概要
- 官網地址
- 開發板管理地址
- 安裝ESP8266開發板支持
- 離線安裝
- 額外記錄NODE啟動服務
概要
Arduino IDE離線安裝ESP8266板管理工具,在線安裝因為網絡或者https的問題不能安裝
官網地址
Adruino:https://www.arduino.cc/
ESP8266項目:<a href-‘https://github.com/esp8266/’ target=‘_blank’>https://github.com/esp8266/
開發板管理地址
在配置了地址之后,會將該JSON文件下載到本地目錄
安裝ESP8266開發板支持
離線安裝
按照上面的安裝時候的報錯,可以看到Arduino IDE去下載了什么文件,然后手動將文件下載保存到本地的任意目錄,啟動一個HTTP服務,下面是用NODE啟動一個簡單的HTTP服務
使用npm install http-server -g
全局安裝http-server
/e/workspace/http-server
$ http-server ./public -p 3000 --cors
Starting up http-server, serving ./publichttp-server version: 14.1.1http-server settings:
CORS: true
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: noneAvailable on:http://192.168.0.119:3000http://127.0.0.1:3000
Hit CTRL-C to stop the server
將下載的文件放到/e/workspace/http-server/public
下
啟動上面的服務,在瀏覽器中訪問
將上面的地址文件下載地址替換掉package_esp8266com_index.json
中下載的文件地址
https://github.com/esp8266/Arduino/releases/download/3.1.2/esp8266-3.1.2.zip
https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/python3-3.7.2.post1-embed-win32v2a.zip
https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.1.0-gcc10.3/x86_64-w64-mingw32.xtensa-lx106-elf-e5f9fec.220621.zip
https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.1.0-gcc10.3/x86_64-w64-mingw32.mkspiffs-7fefeac.220621.zip
https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.1.0-gcc10.3/x86_64-w64-mingw32.mklittlefs-30b7fc1.220621.zip
替換為
http://localhost:3000/esp8266-3.1.2.zip
http://localhost:3000/python3-3.7.2.post1-embed-win32v2a.zip
http://localhost:3000/x86_64-w64-mingw32.xtensa-lx106-elf-e5f9fec.220621.zip
http://localhost:3000/x86_64-w64-mingw32.mkspiffs-7fefeac.220621.zip
http://localhost:3000/x86_64-w64-mingw32.mklittlefs-30b7fc1.220621.zip
然后重啟Arduino IDE,繼續安裝,就能安裝成功
額外記錄NODE啟動服務
可以使用項目方式啟動
$ npm init
$ cd http-server
$ mkdir public
$ npm install http-server --save-dev
$ npm install express --save-dev
$ npm install serve-index --save-dev
編輯package.json
文件
{"name": "http-server","version": "1.0.0","main": "server.js","scripts": {"serve": "node server.js"},"author": "","license": "ISC","description": "","devDependencies": {"express": "^5.1.0","http-server": "^14.1.1","serve-index": "^1.9.1"}
}
創建server.js
文件
const express = require('express');
const path = require('path');
const serveIndex = require('serve-index');const app = express();app.use((req, res, next) => {res.header('Access-Control-Allow-Origin', '*');next();
});app.use(express.static(path.join(__dirname, './public')));app.use('/', serveIndex(path.join(__dirname, './public'), {icons: true,stylesheet: false// stylesheet: './style.css',
}));app.listen(60802, () => {console.log('Server running on http://localhost:60802');
});
啟動
$npm run serve> http-server@1.0.0 serve
> node server.jsServer running on http://localhost:60802