![[Pasted image 20240619141159.png]]
Technical Specification | Value |
---|---|
Supply voltage (USB) | 5V DC |
Input/output voltage | 3.3V DC |
Clock frequency | 80 MHz / 160 MHz |
Instructions RAM | 32 kb |
Data RAM | 96 kb |
External flash memory | 4 MB |
GPIO digital pins | 17 (configurable as a PWM at 3.3V) |
ADC analog pin | 1 (voltage range: 0 - 1V) |
UART | 2 |
-
Install ESP8266 Board Package:
- Open Arduino IDE.
- Go to
File > Preferences
. - Add
http://arduino.esp8266.com/stable/package_esp8266com_index.json
to "Additional Board Manager URLs". - Go to
Tools > Board > Board Manager
. - Search for and install
esp8266
.
-
Connect ESP8266 to Computer:
- Use a USB cable to connect your ESP8266 to the computer.
-
Select Board and Port:
- Go to
Tools > Board
and select your ESP8266 board - (e.g., "NodeMCU 1.0" or generic)
- Go to
Tools > Port
and select the appropriate COM port. (might be automatic)
- Go to
-
Write and Upload Sketch:
- Write your sketch in the Arduino IDE.
- Click the upload button to transfer the sketch to the ESP8266.
(Still figuring o) Uploading files to the ESP8266 module, such as HTML, CSS, JavaScript, and other resources, involves using a feature called SPIFFS (SPI Flash File System) or LittleFS. These filesystems allow you to store and serve files directly from the module's Flash memory, eliminating the need for an external SD card. Here's a step-by-step guide on how to upload files to ESP8266 using the Arduino IDE:
https://github.com/earlephilhower/arduino-esp8266littlefs-plugin?tab=readme-ov-file
https://github.com/earlephilhower/arduino-littlefs-upload
-
Prepare Your Files:
- Create or gather the files (e.g.,
index.html
,style.css
,script.js
) you want to upload to ESP8266. - These files should be organized in a folder structure that mirrors how they will be accessed in your code (e.g.,
/index.html
,/css/style.css
,/js/script.js
).
- Create or gather the files (e.g.,
-
Convert Files to Binary:
- Before uploading, these files need to be converted to binary format and stored in a special folder within your Arduino sketch directory.
- Create a folder named
data
in your Arduino sketch folder (where your.ino
file is located). If thedata
folder doesn't exist, create it manually.
- File Size Limitations: Individual file sizes should be within the limits of your ESP8266's Flash memory. Avoid very large files as they may consume too much space or cause performance issues.
- SPIFFS vs. LittleFS: Choose the filesystem based on your ESP8266 board and requirements. LittleFS generally offers better performance and efficiency for larger filesystems.
By following these steps, you can effectively manage and serve web content directly from your ESP8266 module's Flash memory without the need for external storage devices. This approach is convenient for applications where simplicity and integration are key considerations.