Wiznet makers

bruno

Published October 05, 2023 ©

109 UCC

14 WCC

28 VAR

0 Contests

0 Followers

0 Following

Original Link

smart-web-blind

An Arduino Uno + W5100 powered automatic blind controlled via a local server. Web app files in public folder; main code in src/main.cpp. Design on Figma.

COMPONENTS Hardware components

WIZnet - W5100

x 1


PROJECT DESCRIPTION

Thank you, "eolunas", for using Wiznet products.

eolunas github link : https://github.com/eolunas

 

This GitHub (smart-web-blind) is an automatic blind controlled by a server application on the local network using W5100.

Let's take a quick look at the src folder and main.cpp file for the Arduino source code for this blind.

Initial setup (setup function):

You can start serial communication and output for debugging.
Make sure the SD card is initialized and accessible.
Start Ethernet to run the web server. The server starts listening on IP address 192.168.20.177 and port 80.
Make initial settings for UDP communication. This is used to request time information from an NTP server.
Set pins for motor control using H Bridge.
NTP time request:
Get the current time by sending an NTP packet. This time may be displayed on the web page.
Web server functions (serverFunctions function):
Listens and responds to client requests.
Analyzes HTTP requests and takes appropriate action.
Adjust the position of the blind up or down, and if there is no specific request, open the index.htm file on the SD card and send the web page to the client.
Main iteration (loop function):
Every minute (or on initial startup) it calls clientFunctions to perform work on the client.
It continues to call serverFunctions to perform the functions of the web server.
This code implements a web server using Ethernet and an SD card, and provides the ability to display the time on a web page and adjust the position of the blinds.

 

 App image attached to test

 

Documents
  • Github

Comments Write