# pr3t3r1t0/ethernet architecture

> Architecture diagram of the GitHub repository pr3t3r1t0/ethernet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pr3t3r1t0/ethernet
- Repository: https://github.com/pr3t3r1t0/ethernet

## Overview

1. **Repository shape**
   - This is not a single application; it is a **collection of self-contained Arduino/Ethernet practice projects** plus documentation and a few unrelated side examples.
   - The root README points to **`Sensorica`** as the main program, with `index.html` as a companion page.

2. **Primary architectural theme**
   - Most folders follow the same pattern: an **Arduino sketch** (`.ino`) that runs on the microcontroller and exposes data or controls over Ethernet.
   - The firmware is the control center; browsers or external services are the clients.

3. **Main embedded entry point**
   - `Sensorica/Sensorica.ino` and `Sensorica/index.html` represent the main sample.
   - This pairing suggests a typical flow of **sensor acquisition on Arduino → web response to a browser page**.

4. **Web UI layer**
   - Many practices include static web assets such as `index.htm`, `index.html`, `page2.htm`, CSS, and AJAX-oriented pages.
   - These pages are usually **served from the Arduino itself** or loaded from an SD card, then updated by browser-side requests to the board.

5. **Embedded server + SD card pattern**
   - Several projects in `Practica4-*` and `Practica5-*` use the Arduino as an **HTTP server** with pages stored in flash/SD.
   - This creates a clear boundary: **firmware handles networking and data generation**, while the HTML files provide the UI.

6. **AJAX / dynamic-update pattern**
   - Multiple examples are built around AJAX, XML, gauges, and dashboard-like displays.
   - The data flow is: **browser polls Arduino endpoints → Arduino returns sensor/state values → page updates without full reload**.

7. **Hardware control patterns**
   - Some sketches focus on **digital output control** like switches, LEDs, RGB LEDs, and button-driven states.
   - Others focus on **analog sensor monitoring** such as voltmeters, solar panel telemetry, DHT temperature/humidity, and weather-station-style readings.

8. **Reusable code modules**
   - `ServidorWebArduino-controlar_LedRGB-master` includes reusable C++ modules like `LedRGB` and `Tela`, showing a more modular Arduino structure than the one-off sketches.
   - This folder separates **UI/logic helpers** from the main sketch, which is useful to represent as internal firmware libraries.

9. **External service integrations**
   - Some projects do not stop at the Arduino board: they integrate with **PHP/MySQL**, **ThingSpeak**, or **SMS/web services**.
   - Examples include `W5100-Eventos-master` and `arduino-dht-ethernet-master` with PHP scripts, plus `Practica6-ThingSpeak` for cloud telemetry.
   - These introduce a second backend boundary: **Arduino → external server/service → persistent storage or dashboards**.

10. **Hardware stack**
   - The documentation and sketches center on **Arduino + Ethernet shields/controllers** such as **W5100/W5500**.
   - SD card support is also common, and the repo includes datasheets, guides, and bootloader/networking references that support that hardware-centric architecture.

11. **Ancillary Node.js example**
   - `AlarmasUT-main` is a separate standalone web app with `server.js`, `index.html`, and `public/main.css`.
   - It appears to be independent from the Arduino tutorial ecosystem, so in a diagram it should be shown as a **separate side project**, not part of the core data path.

12. **Documentation as a first-class subsystem**
   - `Guias/` and `Documentacion/` contain explanations, comparisons, PDFs, and tutorial material.
   - For an architecture diagram, these are best treated as **supporting artifacts** rather than runtime components.

13. **How to draw the repo**
   - The cleanest diagram is a **family of similar embedded web-server systems**:
     - microcontroller + Ethernet shield
     - optional SD card / local files
     - browser UI with AJAX
     - optional external PHP/MySQL/ThingSpeak/SMS backends
   - Then place the many practice folders as **independent instances of that pattern**, not as modules in one monolithic system.

Main entry points: [`Sensorica/Sensorica.ino`](https://github.com/pr3t3r1t0/ethernet/blob/main/Sensorica/Sensorica.ino) (Sensorica), [`Practica4-eth_websrv_SD_Ajax/Practica4-eth_websrv_SD_Ajax.ino`](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica4-eth_websrv_SD_Ajax/Practica4-eth_websrv_SD_Ajax.ino) (SD Ajax), [`Practica5-web_server_IO/eth_websrv_SD_Ajax_in_out/eth_websrv_SD_Ajax_in_out.ino`](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica5-web_server_IO/eth_websrv_SD_Ajax_in_out/eth_websrv_SD_Ajax_in_out.ino) (IO Server), [`Practica5-web_server_Panel/PanelSolarsimple/PanelSolarsimple.ino`](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica5-web_server_Panel/PanelSolarsimple/PanelSolarsimple.ino) (Solar Panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Embedded practice suites"]
  node_sensorica["Sensorica<br/>arduino sample<br/>[Sensorica.ino]"]
  node_sensorica_ui["Sensorica UI<br/>web client<br/>[index.html]"]
  node_practica4_ajax["SD Ajax<br/>arduino web server"]
  node_practica4_xml["XML Ajax<br/>arduino web server"]
  node_practica4_gauge["Gauge UI<br/>arduino dashboard"]
  node_practica4_image["SD Image<br/>arduino web server"]
  node_practica5_panel["Solar Panel<br/>arduino monitor"]
  node_practica5_io["IO Server<br/>arduino web server"]
  node_practica5_mega["Mega Ajax<br/>arduino web server"]
  node_rgb_web["RGB Web<br/>modular firmware<br/>[RGB_web.ino]"]
  node_dual_dht["Dual DHT<br/>thermostat sketch"]
  node_simple_weather["Weather Station<br/>monitoring sketch"]
end

subgraph group_integrations["External integrations"]
  node_prac6_thingspeak["ThingSpeak<br/>cloud telemetry"]
  node_dht_mysql["DHT MySQL<br/>php-backed logger"]
  node_w5100_eventos["Eventos<br/>arduino php app<br/>[W5100-Eventos.ino]"]
  node_arduino_voice["Voice Control<br/>arduino php app"]
  node_arduino_sms["SMS Web<br/>arduino integration<br/>[WebSMS.ino]"]
end

subgraph group_docs["Documentation"]
  node_guias["Guides<br/>support docs"]
end

subgraph group_side["Side projects"]
  node_alarmas_ut["AlarmasUT<br/>node web app<br/>[server.js]"]
end

subgraph group_hardware["Hardware references"]
  node_documentacion["References<br/>support docs"]
  node_w5100_refs["W5100 Kit<br/>hardware refs<br/>[W5100.pdf]"]
end

node_root_readme["Repo README<br/>overview<br/>[README.md]"]

node_root_readme -->|"points to"| node_sensorica
node_sensorica -->|"serves"| node_sensorica_ui
node_sensorica -.->|"same pattern"| node_practica4_ajax
node_practica4_ajax -.->|"variant of"| node_practica4_xml
node_practica4_ajax -.->|"variant of"| node_practica4_gauge
node_practica4_ajax -.->|"variant of"| node_practica4_image
node_practica4_ajax -.->|"evolves into"| node_practica5_io
node_practica5_io -.->|"evolves into"| node_practica5_panel
node_practica5_io -.->|"board variant"| node_practica5_mega
node_practica5_panel -.->|"cloud path"| node_prac6_thingspeak
node_sensorica -.->|"sensor family"| node_dual_dht
node_sensorica -.->|"sensor family"| node_simple_weather
node_rgb_web -.->|"modular control"| node_arduino_voice
node_arduino_voice -.->|"external backend"| node_dht_mysql
node_dht_mysql -.->|"php integration"| node_w5100_eventos
node_w5100_eventos -.->|"service integration"| node_arduino_sms
node_alarmas_ut -.->|"separate project"| node_root_readme
node_guias -.->|"documents"| node_sensorica
node_documentacion -.->|"supports"| node_w5100_refs
node_w5100_refs -.->|"enables"| node_practica4_ajax

click node_root_readme "https://github.com/pr3t3r1t0/ethernet/blob/main/README.md"
click node_sensorica "https://github.com/pr3t3r1t0/ethernet/blob/main/Sensorica/Sensorica.ino"
click node_sensorica_ui "https://github.com/pr3t3r1t0/ethernet/blob/main/Sensorica/index.html"
click node_practica4_ajax "https://github.com/pr3t3r1t0/ethernet/blob/main/Practica4-eth_websrv_SD_Ajax/Practica4-eth_websrv_SD_Ajax.ino"
click node_practica4_xml "https://github.com/pr3t3r1t0/ethernet/blob/main/Practica4-eth_websrv_SD_Ajax_XML/Practica4-eth_websrv_SD_Ajax_XML.ino"
click node_practica4_gauge "https://github.com/pr3t3r1t0/ethernet/blob/main/Practica4-eth_websrv_SD_Ajax_gauge/Practica4-eth_websrv_SD_Ajax_gauge.ino"
click node_practica4_image "https://github.com/pr3t3r1t0/ethernet/blob/main/Practica4-eth_websrv_SD_image/Practica4-eth_websrv_SD_image.ino"
click node_practica5_panel "https://github.com/pr3t3r1t0/ethernet/blob/main/Practica5-web_server_Panel/PanelSolarsimple/PanelSolarsimple.ino"
click node_practica5_io "https://github.com/pr3t3r1t0/ethernet/blob/main/Practica5-web_server_IO/eth_websrv_SD_Ajax_in_out/eth_websrv_SD_Ajax_in_out.ino"
click node_practica5_mega "https://github.com/pr3t3r1t0/ethernet/blob/main/Practica5-Mega/eth_websrv_SD_Ajax_24_out/eth_websrv_SD_Ajax_24_out.ino"
click node_prac6_thingspeak "https://github.com/pr3t3r1t0/ethernet/blob/main/Practica6-ThingSpeak/Practica6-ThingSpeak.ino"
click node_dht_mysql "https://github.com/pr3t3r1t0/ethernet/blob/main/arduino-dht-ethernet-master/Arduino sketch/DHT_W5100_logger.ino"
click node_w5100_eventos "https://github.com/pr3t3r1t0/ethernet/blob/main/W5100-Eventos-master/W5100-Eventos.ino"
click node_arduino_voice "https://github.com/pr3t3r1t0/ethernet/blob/main/Arduino-Voice-control-master/arduino_english_version.ino"
click node_arduino_sms "https://github.com/pr3t3r1t0/ethernet/blob/main/arduino-sms-web-master/WebSMS.ino"
click node_rgb_web "https://github.com/pr3t3r1t0/ethernet/blob/main/ServidorWebArduino-controlar_LedRGB-master/RGB_web/RGB_web.ino"
click node_dual_dht "https://github.com/pr3t3r1t0/ethernet/blob/main/DualDHTthermostat-master/DualDHTthermostat.ino"
click node_simple_weather "https://github.com/pr3t3r1t0/ethernet/blob/main/simpleweatherstation-master/simpleweatherstation.ino"
click node_alarmas_ut "https://github.com/pr3t3r1t0/ethernet/blob/main/AlarmasUT-main/server.js"
click node_guias "https://github.com/pr3t3r1t0/ethernet/blob/main/Guias/Resumen_Practicas.md"
click node_documentacion "https://github.com/pr3t3r1t0/ethernet/blob/main/Documentacion/W5100_Datasheet_v1_1_6.pdf"
click node_w5100_refs "https://github.com/pr3t3r1t0/ethernet/blob/main/W5100-master/W5100.pdf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sensorica,node_sensorica_ui,node_practica4_ajax,node_practica4_xml,node_practica4_gauge,node_practica4_image,node_practica5_panel,node_practica5_io,node_practica5_mega,node_rgb_web,node_dual_dht,node_simple_weather toneBlue
class node_prac6_thingspeak,node_dht_mysql,node_w5100_eventos,node_arduino_voice,node_arduino_sms toneAmber
class node_guias toneMint
class node_alarmas_ut toneRose
class node_documentacion,node_w5100_refs toneIndigo
class node_root_readme toneNeutral
```

## Components

### Embedded practice suites

Arduino/Ethernet samples that form the main tutorial family.

- [Sensorica](https://github.com/pr3t3r1t0/ethernet/blob/main/Sensorica/Sensorica.ino): arduino sample · Main sample pairing Arduino firmware with a browser page for sensor-driven web output. · `Sensorica/Sensorica.ino`
- [Sensorica UI](https://github.com/pr3t3r1t0/ethernet/blob/main/Sensorica/index.html): web client · Companion browser page for the Sensorica sample. · `Sensorica/index.html`
- [SD Ajax](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica4-eth_websrv_SD_Ajax/Practica4-eth_websrv_SD_Ajax.ino): arduino web server · Representative SD-hosted web server example with AJAX-driven updates. · `Practica4-eth_websrv_SD_Ajax/Practica4-eth_websrv_SD_Ajax.ino`
- [XML Ajax](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica4-eth_websrv_SD_Ajax_XML/Practica4-eth_websrv_SD_Ajax_XML.ino): arduino web server · Variant of the SD web server pattern using XML-style responses. · `Practica4-eth_websrv_SD_Ajax_XML/Practica4-eth_websrv_SD_Ajax_XML.ino`
- [Gauge UI](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica4-eth_websrv_SD_Ajax_gauge/Practica4-eth_websrv_SD_Ajax_gauge.ino): arduino dashboard · Web dashboard sample centered on a gauge-style front end. · `Practica4-eth_websrv_SD_Ajax_gauge/Practica4-eth_websrv_SD_Ajax_gauge.ino`
- [SD Image](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica4-eth_websrv_SD_image/Practica4-eth_websrv_SD_image.ino): arduino web server · SD-card-backed site with multiple pages served by the board. · `Practica4-eth_websrv_SD_image/Practica4-eth_websrv_SD_image.ino`
- [Solar Panel](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica5-web_server_Panel/PanelSolarsimple/PanelSolarsimple.ino): arduino monitor · Monitoring-oriented web server sample for panel-style telemetry. · `Practica5-web_server_Panel/PanelSolarsimple/PanelSolarsimple.ino`
- [IO Server](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica5-web_server_IO/eth_websrv_SD_Ajax_in_out/eth_websrv_SD_Ajax_in_out.ino): arduino web server · Input/output web server sample with AJAX updates and page assets. · `Practica5-web_server_IO/eth_websrv_SD_Ajax_in_out/eth_websrv_SD_Ajax_in_out.ino`
- [Mega Ajax](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica5-Mega/eth_websrv_SD_Ajax_24_out/eth_websrv_SD_Ajax_24_out.ino): arduino web server · Mega-board variant of the SD Ajax web server pattern. · `Practica5-Mega/eth_websrv_SD_Ajax_24_out/eth_websrv_SD_Ajax_24_out.ino`
- [RGB Web](https://github.com/pr3t3r1t0/ethernet/blob/main/ServidorWebArduino-controlar_LedRGB-master/RGB_web/RGB_web.ino): modular firmware · Modular Arduino web control example split into helper classes and sketch logic. · `ServidorWebArduino-controlar_LedRGB-master/RGB_web/RGB_web.ino`
- [Dual DHT](https://github.com/pr3t3r1t0/ethernet/blob/main/DualDHTthermostat-master/DualDHTthermostat.ino): thermostat sketch · Standalone embedded thermostat-style monitoring sketch. · `DualDHTthermostat-master/DualDHTthermostat.ino`
- [Weather Station](https://github.com/pr3t3r1t0/ethernet/blob/main/simpleweatherstation-master/simpleweatherstation.ino): monitoring sketch · Standalone weather-station style Arduino sketch. · `simpleweatherstation-master/simpleweatherstation.ino`

### External integrations

Projects that connect Arduino data to PHP, MySQL, ThingSpeak, SMS, or other services.

- [ThingSpeak](https://github.com/pr3t3r1t0/ethernet/blob/main/Practica6-ThingSpeak/Practica6-ThingSpeak.ino): cloud telemetry · Telemetry example that pushes sensor data to a cloud service. · `Practica6-ThingSpeak/Practica6-ThingSpeak.ino`
- [DHT MySQL](https://github.com/pr3t3r1t0/ethernet/blob/HEAD/arduino-dht-ethernet-master/Arduino%20sketch/DHT_W5100_logger.ino): php-backed logger · Arduino plus PHP/MySQL logging flow for sensor data persistence. · `arduino-dht-ethernet-master/Arduino sketch/DHT_W5100_logger.ino`
- [Eventos](https://github.com/pr3t3r1t0/ethernet/blob/main/W5100-Eventos-master/W5100-Eventos.ino): arduino php app · Event-oriented Arduino project paired with PHP endpoints. · `W5100-Eventos-master/W5100-Eventos.ino`
- [Voice Control](https://github.com/pr3t3r1t0/ethernet/blob/main/Arduino-Voice-control-master/arduino_english_version.ino): arduino php app · Arduino project with PHP front end and AJAX-based interaction. · `Arduino-Voice-control-master/arduino_english_version.ino`
- [SMS Web](https://github.com/pr3t3r1t0/ethernet/blob/main/arduino-sms-web-master/WebSMS.ino): arduino integration · Arduino sketch for web or SMS-enabled control flow. · `arduino-sms-web-master/WebSMS.ino`

### Documentation

Guides, comparisons, and reference material supporting the practice projects.

- [Guides](https://github.com/pr3t3r1t0/ethernet/blob/main/Guias/Resumen_Practicas.md): support docs · How-to material and architectural summaries for the practice collection. · `Guias/Resumen_Practicas.md`

### Side projects

Standalone examples that sit outside the main Arduino tutorial family.

- [AlarmasUT](https://github.com/pr3t3r1t0/ethernet/blob/main/AlarmasUT-main/server.js): node web app · Separate Node.js web application with its own server and static assets. · `AlarmasUT-main/server.js`

### Hardware references

Datasheets, schematics, and board support material for the Ethernet stack.

- [References](https://github.com/pr3t3r1t0/ethernet/blob/main/Documentacion/W5100_Datasheet_v1_1_6.pdf): support docs · Reference PDFs, bootloader notes, and datasheets for the hardware stack. · `Documentacion/W5100_Datasheet_v1_1_6.pdf`
- [W5100 Kit](https://github.com/pr3t3r1t0/ethernet/blob/main/W5100-master/W5100.pdf): hardware refs · Board, schematic, and reference documents for the W5100 Ethernet platform. · `W5100-master/W5100.pdf`

### Other components

- [Repo README](https://github.com/pr3t3r1t0/ethernet/blob/main/README.md): overview · Top-level entry point that frames the repository as a set of Ethernet practice projects. · `README.md`

## Connections

- Repo README → Sensorica: points to · Top-level README highlights Sensorica as the main program.
- Sensorica → Sensorica UI: serves · Firmware is paired with a browser page for displaying data.
- Sensorica → SD Ajax: same pattern · Represents the common Arduino-to-browser web server flow.
- SD Ajax → XML Ajax: variant of · XML response variant of the same embedded web server pattern.
- SD Ajax → Gauge UI: variant of · Dashboard/gauge front end built on the same server model.
- SD Ajax → SD Image: variant of · Multi-page SD-hosted website variant.
- SD Ajax → IO Server: evolves into · Later practice adds input/output handling and AJAX updates.
- IO Server → Solar Panel: evolves into · Panel-oriented monitoring refines the same embedded server idea.
- IO Server → Mega Ajax: board variant · Mega-board implementation of the same web server architecture.
- Solar Panel → ThingSpeak: cloud path · Telemetry extends from local monitoring to a hosted service.
- Sensorica → Dual DHT: sensor family · Both are sensor-monitoring embedded sketches.
- Sensorica → Weather Station: sensor family · Both focus on environmental measurements and reporting.
- RGB Web → Voice Control: modular control · Both belong to the more modular Arduino web-control examples.
- Voice Control → DHT MySQL: external backend · Both connect Arduino-generated data to PHP-side processing.
- DHT MySQL → Eventos: php integration · Represents the PHP/MySQL-backed integration style in the repo.
- Eventos → SMS Web: service integration · Both demonstrate Arduino beyond local UI into external communication services.
- AlarmasUT → Repo README: separate project · Standalone Node app that is unrelated to the Arduino tutorial core.
- Guides → Sensorica: documents · Guides explain and summarize the practice projects.
- References → W5100 Kit: supports · Reference material supports the Ethernet/W5100 hardware stack.
- W5100 Kit → SD Ajax: enables · Hardware references underpin the Ethernet web-server examples.
