Skip to content

Add the WebServer test sketch #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 12, 2022
Merged

Add the WebServer test sketch #104

merged 4 commits into from
May 12, 2022

Conversation

LeeLeahy2
Copy link
Contributor

New test sketch to serve the files on the SD card.

Using the serial connection, enter the WiFi network name (SSID) and password. Once complete, the system will display the IP address if it is able to connect to the specified WiFi network. Using a browser on another system, connect to the IP address that the ESP32 system displayed. If the SD card socket is empty, an error message will be displayed on the browser. Just insert the SD card and refresh the webpage.

If an SD card is in the socket, a link should show up on the browser describing the SD card. If the SD card is not properly formatted, and error message will be displayed on the browser. Otherwise, clicking on this link will display the files on the SD card. Clicking on one of the file links downloads that file from the ESP32 system to the computer running the browser.

@@ -0,0 +1,162 @@
/*
Web server test program
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional comments here please. What's this do? Why does it exist?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would copy/paste most of your original PR message.

int wifiConnected;

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
int mountSdCard(void) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is purely stylistic, but sketches have setup(), then loop(), then any supporting functions. Users (I constantly think about the students I taught) want to know what the thing does, and can get lost scrolling though lots of top functions just to get to setup/loop.

@nseidle nseidle changed the base branch from main to release_candidate May 12, 2022 15:20
@nseidle nseidle merged commit d3442a4 into sparkfun:release_candidate May 12, 2022
@LeeLeahy2 LeeLeahy2 deleted the webserver branch June 3, 2022 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants