Repository project - Github: Termostat - Ethernet
Arduino Ethernet Wiznet W5100 / W5500 DS18B20 OneWire Dallas HTML Webserver WebSocket
MAC address of Ethernet thermostat: DE:AD:BE:EF:FE:ED - For the needs of static IP address assignment from the DHCP service
Uploading the program to Arduino via avrdude (sample for COM21 and the program sketch.ino.hex):
avrdude -CC: avrdude.conf -v -patmega328p -carduino -PCOM21 -b115200 -D -Uflash:w:sketch.ino.hex:i
Uploading the program to Arduino Nano with "OLD Bootloader" via avrdude (sample for COM21 and program sketch.ino.hex):
avrdude -CC: avrdude.conf -v -patmega328p -carduino -PCOM21 -b57600 -D -Uflash:w:sketch.ino.hex:i

Launch of the room thermostat project - Arduino + Ethernet Wiznet W5100 / W5500


The Ethernet (room) thermostat project also exists in a free version, which is available in the Githube repository. The version contains a total of 6 machine - precompiled programs for the Arduino Uno platform. Machine code (.hex) guarantees that the program is compatible and has the same functionality for all devices to which it is loaded and run. Firmware upload is quick and easy via the AVRDUDE / XLoader with a graphical interface. The main application starts immediately after the firmware is loaded. The code is thus universal and provides an opportunity to provide the author interested in trying out the project of its build without access to the source (.ino) code. Since each Ethernet thermostat has the same - predefined MAC address, it is possible to use only one thermostat in the LAN network, otherwise there will be a conflict of MAC addresses and not a single thermostat will communicate.

The free version is only available in machine code form without access to the application written in .ino format from which the program was compiled.

Strojový kód aplikácie Ethernet izbový termostat
Machine shield splitting based on Ethernet shield:
  • Ethernet Wiznet W5100
  • Ethernet Wiznet W5500 (W5200 - 5500 compatible)
  • Machine code distribution based on IPv4 LAN address assignment:
  • Static - assigned statically directly in the source code (192.168.4.1 / 192.168.1.254) 24-bit mask, i. network 192.168.4.0 / 192.168.1.0
  • Dynamic - assigned dynamically via DHCP server in the LAN network (can be statically assigned to the destination MAC address via a rule in the router)
  • Firmware name Shield IPv4
    dynamic_W5100.hex W5100 controlled via DHCP (includes maintain to extend lease time / request new IP)
    dynamic_W5500.hex W5500 controlled via DHCP (includes maintain to extend lease time / request new IP)
    static_W5100_1_254.hex W5100 192.168.1.254
    static_W5100_4_1.hex W5100 192.168.4.1
    static_W5500_1_254.hex W5500 192.168.1.254
    static_W5500_4_1.hex W5500 192.168.4.1

    To upload machine code to Arduino, it is possible to use the AVRDUDE tool, which also uses the Arduino IDE environment to upload the compiled program. The tool can be run directly from the command line, but it is necessary to set all configurable data correctly, so it is not suitable for less experienced programmers or laymen. XLoader is a Windows application (tool) with a simple graphical interface that allows the selection of firmware - machine code (.hex), the target platform and can dynamically show the COM port on which the device is located. It allows you to burn firmware to AVR platforms, i. Arduino Uno, Nano, Duemilanove (AtMega328 / AtMega168), Arduino Mega (AtMega1280 / AtMega2560). By simply clicking on Upload, the machine code can be uploaded automatically (XLoader uses the AVRDUDE tool similar to the Arduino IDE). The XLoader window informs about the successful upload in the form of a list of the number of bytes uploaded.

    XLoader - Arduino - AVRDUDE - Termostat - Ethernet
    After successfully uploading the machine code to the Arduino, the thermostat is fully ready and available at its IP address. The program works on the basis of the project wiring diagram and the logic from the description.

    Video tutorial for uploading firmware to Arduino via XLoader