Skip to content

Commit

Permalink
Update WiFiWebServer.ino (#168)
Browse files Browse the repository at this point in the history
Fix WiFiWebServer.ino unable to read analog input.
  • Loading branch information
Aurical authored Apr 12, 2023
1 parent ab9b9b7 commit 7227796
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ char pass[] = "Password"; // your network password
int keyIndex = 0; // your network key Index number (needed only for WEP)

//State the analog pin that you want to read
int analogChannel = 0;
int analogChannel = A0;

int status = WL_IDLE_STATUS;

Expand Down Expand Up @@ -64,9 +64,7 @@ void loop() {
client.println("<html>");
// output the value of each analog input pin
int sensorReading = analogRead(analogChannel);
client.print("analog input ");
client.print(analogChannel);
client.print(" is ");
client.print("analog input reading is ");
client.print(sensorReading);
client.println("<br />");
client.println("</html>");
Expand Down

0 comments on commit 7227796

Please sign in to comment.