@AaronLei0This is a site that went with a theme of //github.com/aaronsfunstuff/car-hub/commit/26d37d17e4f4e439b4f2e74ba7ff33182414eccc> THERE IS NO NSFW IN THIS
@JAIAAKASHG0#include <ESP8266WiFi.h>
// Replace with your network credentials
const char ssid = "Airtel_PRAKASH";
const char password = "9941113669";
// Set web server port number to 80
WiFiServer server(80);
// Variable to store the HTTP request
String header;
// Current state of the buzzer
String buzzerState = "off";
// Assign GPIO pin for the buzzer
const int buzzerPin = D2;
void setup() {
Serial.begin(115200);
pinMode(buzzerPin, OUTPUT);
digitalWrite(buzzerPin, LOW);
// Connect to Wi-Fi network
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
}
// Print local IP address and start web server
Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
server.begin();
}
void loop() {
WiFiClient client = server.available(); // Listen for incoming clients
if (client) { // If a new client connects,
Serial.println("New Client."); // print a message out in the serial port
String currentLine = ""; // make a String to hold incoming data from the client
while (client.connected()) { // loop while the client's connected
if (client.available()) { // if there's bytes to read from the client,
char c = client.read(); // read a byte, then
Serial.write(c); // print it out the serial monitor
header += c;
if (c == '\n') { // if the byte is a newline character
if (currentLine.length() == 0) {
// HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)
// and a content-type so the client knows what's coming, then a blank line:
client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println("Connection: close");
client.println();
// Display the HTML web page
client.println("!DOCTYPE html<html>");
client.println("<head><title>ESP8266 Buzzer Control</title></head>");
client.println("<body><h1>ESP8266 Buzzer Control</h1>");
client.println("<p>Buzzer State: " + buzzerState + "</p>");
client.println("<p><a href=\"/H\"><button>ON</button></a></p>");
client.println("<p><a href=\"/L\"><button>OFF</button></a></p>");
client.println("</body></html>");
// The HTTP response ends with another blank line
client.println();
break;
} else { // if you got a newline, then clear currentLine
currentLine = "";
}
} else if (c != '\r') { // if you got anything else but a carriage return character,
currentLine += c; // add it to the end of the currentLine
}
// Check if the client is requesting the buzzer to be turned on or off
if (header.indexOf("GET /H") >= 0) {
Serial.println("Buzzer ON");
buzzerState = "on";
digitalWrite(buzzerPin, HIGH);
} else if (header.indexOf("GET /L") >= 0) {
Serial.println("Buzzer OFF");
buzzerState = "off";
digitalWrite(buzzerPin, LOW);
}
}
}
// Clear the header variable
header = "";
// Close the connection
client.stop();
Serial.println("Client disconnected.");
Serial.println("");
}
}
@TheScientist1010I just made a PR for #arcade to fix the truncation on the scrapbook banking messages. Idk if it works, and it was literally 1 line of code (so I don’t expect any tickets from this), but it’s the first PR I’ve made in a while so hey!
I can’t show any pictures of it in action (since it hasn’t been accepted yet), but here’s a thread of the issue.
hackclub.slack.com/archives/C0266FRGV/p1718717652692109
@Nikhil0#hack-hour fixed some bugs with the camera to make it zoom out as the player go farther apart.
@jzaleta0So recently I've been thinking on open source and projects abandonment, and the Google Graveyard 🪦 is a very good example of some of their projects that have been left. Also today I'm studying for my mid exams and working on projects! Here's an image of my scrapbook before this post. So the point of this is that I'm going to be looking for some abandoned projects that looks for help in order to make a small contribution and bring them back! Maybe with design or documentation while I get better at code! And lastly, I'm going to delete my Twitter Account , I never got to really use it and I would like to avoid the toxicity and problems and better make a blog / part of my website where I post my ideas on things! 💡
@Odyssey3460Please don't give me resources to bake shit.
@lailahn0Days 14&15 of getting my life back together(because I forgot to post yesterday😭): I’ve mainly just been continuing school work and essays! My mom took me out shopping bc of my SAT score 💀
@kayley0🎹 Haven't played the piano in awhile, so decided to randomly sightread a piece; could have gone a lot better.@kayley0So, this is how my day is going so far...