User:ZUZU/SI 24: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 21: Line 21:
=<p style="font-family:Helvetica Neue; font-size: 36px;"> 4/9 </p>=
=<p style="font-family:Helvetica Neue; font-size: 36px;"> 4/9 </p>=
[https://pzwiki.wdka.nl/mediadesign/Microcontroller_101 Microcontroller]
[https://pzwiki.wdka.nl/mediadesign/Microcontroller_101 Microcontroller]
== Beginning of Microcontroller ==
[https://www.sparkfun.com/engineering_essentials Circuit Brief]<br>
delect right board eg. Wemos Lolin32
*Install ESP32 Board Package
*Tools > Board > Wemos Lolin32
*Tools > Upload Speed


=<p style="font-family:Helvetica Neue; font-size: 36px;"> 4/10 </p>=
=<p style="font-family:Helvetica Neue; font-size: 36px;"> 4/10 </p>=
*<span style ="text-shadow: 0 0 10px blue;">Pad</span> for [https://pad.xpub.nl/p/10-4-24MethodsProjectsThat 10 April]<br>
*<span style ="text-shadow: 0 0 10px blue;">Pad</span> for [https://pad.xpub.nl/p/10-4-24MethodsProjectsThat 10 April]<br>
*<span style ="text-shadow: 0 0 10px #FF0808;">Pad</span> for [https://pad.xpub.nl/p/10-4-24MethodsProjects_z personal reader]<br>
*<span style ="text-shadow: 0 0 10px #FF0808;">Pad</span> for [https://pad.xpub.nl/p/10-4-24MethodsProjects_z personal reader]<br>


== Information Overload ==
== Information Overload ==
Line 34: Line 42:
[https://thecircle-o.com/blog/the-metropolitan-blas-attitude-or-the-flneur The Metropolitan: Blasé attitude or the Flâneur] describes the phenomenon of individuals experiencing a sense of Blasé in metropolitan life
[https://thecircle-o.com/blog/the-metropolitan-blas-attitude-or-the-flneur The Metropolitan: Blasé attitude or the Flâneur] describes the phenomenon of individuals experiencing a sense of Blasé in metropolitan life
I've been trying to find a description about my own feelings about city life, and this term accurately describes my personal emotions
I've been trying to find a description about my own feelings about city life, and this term accurately describes my personal emotions
=<p style="font-family:Helvetica Neue; font-size: 36px;"> 4/15 </p>=
== Making list ==
<span style ="text-shadow: 0 0 10px #FF0808;">Pad</span> for [https://pad.xpub.nl/p/15424_lists lists]<br>
list Sketching, observing the city as a spectator, joining the observation from a subjective point of view
*People sitting in shopping center rest area during workday from 11:11am
*where /how /why people laughing in public space
*List of shop signs
*Things dangerous in the park
*The sound that occurs when people enter a space
*Things between curtains and windows
=<p style="font-family:Helvetica Neue; font-size: 36px;"> 4/23 </p>=
== ESP32 WiFi Access Point with Web Server for LED Control and Sensor Monitoring ==
Create a WiFi Access Point (AP) using an ESP32 microcontroller. It sets up a web server on this AP to control an LED and display sensor readings (humidity and temperature) via a web interface.
<syntaxhighlight lang="cpp">
/*
  WiFiAccessPoint.ino creates a WiFi access point and provides a web server on it.
  Steps:
  1. Connect to the access point "yourAp"
  2. Point your web browser to http://192.168.4.1/H to turn the LED on or http://192.168.4.1/L to turn it off
    OR
    Run raw TCP "GET /H" and "GET /L" on PuTTY terminal with 192.168.4.1 as IP address and 80 as port
  Created for arduino-esp32 on 04 July, 2018
  by Elochukwu Ifediora (fedy0)
*/
#include <DHT.h>
#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiAP.h>
#define DHTPIN 21
#define LED_BUILTIN 23  // Set the GPIO pin where you connected your test LED or comment this line out if your dev board has a built-in LED
   
#define DHTTYPE DHT22 
DHT dht(DHTPIN, DHTTYPE);
float hum;  //Stores humidity value
float temp;
// Set these to your desired credentials.
const char *ssid = "jungle";
const char *password = "myPassword";
WiFiServer server(80);
void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.begin(115200);
  Serial.println();
  Serial.println("Configuring access point...");
  dht.begin();
  // You can remove the password parameter if you want the AP to be open.
  // a valid password must have more than 7 characters
  if (!WiFi.softAP(ssid, password)) {
    log_e("Soft AP creation failed.");
    while(1);
  }
  IPAddress myIP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(myIP);
  server.begin();
  Serial.println("Server started");
}
void loop() {
  WiFiClient client = server.available();  // listen for incoming clients
  int sensorValue = analogRead(34);
 
  if (client) {                            // if you get a client,
    Serial.println("New Client.");          // print a message out 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
        if (c == '\n') {                    // if the byte is a newline character
          // if the current line is blank, you got two newline characters in a row.
          // that's the end of the client HTTP request, so send a response:
          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();
            hum = dht.readHumidity(); 
            temp = dht.readTemperature();
            // the content of the HTTP response follows the header:
            client.print("<meta http-equiv='refresh' content='0.1'>");
            client.print("<style>body{background-color:purple;}</style><br>");
           
            int radius = map(hum, 30, 90, 0, 200);
            client.print("<style>.object{width:400px;height:400px;}</style><br>");
            client.print("<style>.object{border-radius:"+ String(radius)+"px;background-color:white; }</style><br>");
            client.print("<h1>eviltwin" + String(sensorValue) + "</h1><br>");
            client.print("<div class='object'></div><br>");
            client.print("Click <a href=\"/H\">here</a> to turn ON the LED.<br>");
            client.print("Click <a href=\"/L\">here</a> to turn OFF the LED.<br>");
            client.print("<p>Humidity: " + String(hum) + " %</p>");
            client.print("<p>Temperature: " + String(temp) + " °C</p>");
           
            // The HTTP response ends with another blank line:
            client.println();
            // break out of the while loop:
            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 to see if the client request was "GET /H" or "GET /L":
        if (currentLine.endsWith("GET /H")) {
          digitalWrite(LED_BUILTIN, HIGH);              // GET /H turns the LED on
        }
        if (currentLine.endsWith("GET /L")) {
          digitalWrite(LED_BUILTIN, LOW);                // GET /L turns the LED off
        }
      }
    }
    // close the connection:
    client.stop();
    Serial.println("Client Disconnected.");
  }
}
</syntaxhighlight>

Revision as of 23:54, 8 May 2024


4/8

Start

Explore the possibilities of loitering and launching in or around Rotterdam

Why Loiter?

Why Loiter?: Women and Risk on Mumbai Streets by Shilpa Phadke points out that "loitering" is viewed negatively in Indian society, and women are expected to have a legitimate reason for being out in public. Otherwise, they may be considered not conforming to societal expectations of being a "respectable woman." This perspective reflects a common narrative of victim blaming prevalent in patriarchal societies, where women are advised to move from one sheltered space to another , and any deviation from this norm is seen as a moral deficiency by default.

Women have the right to freely navigate urban spaces without fear or judgment. Shilpa Phadke proposes a social initiative that encourages women's "loitering" to occupy urban public spaces, advocating for the creation of a more inclusive and equitable urban environment where women can move about freely without the fear of being labeled or subjected to shame.

Loitering around Blaak

Day1 blaak.jpg

The weather was lovely and we took a nice walk around Blaak, sharing memories of our individual hometowns.

4/9

Microcontroller

Beginning of Microcontroller

Circuit Brief
delect right board eg. Wemos Lolin32

  • Install ESP32 Board Package
  • Tools > Board > Wemos Lolin32
  • Tools > Upload Speed

4/10


Information Overload

INFORMATION OVERLOAD by Claire Bishop The article discusses the development of research-based installation art in contemporary art and the problems it faces.The author points out that a large number of research-based installation artworks have emerged in recent years that lack clear definitions and critical analyses. The article analyses three stages in the development of research-based art:"Many of these pieces convey a sense of being immersed-even lost-in data." Contemporary viewers face pressures from visually saturated contexts and attentional economies when processing information. And contemporary audiences are under pressure to process information through visual saturation and an economy of attention.

Blasé attitude or the Flâneur

The Metropolitan: Blasé attitude or the Flâneur describes the phenomenon of individuals experiencing a sense of Blasé in metropolitan life I've been trying to find a description about my own feelings about city life, and this term accurately describes my personal emotions

4/15

Making list

Pad for lists
list Sketching, observing the city as a spectator, joining the observation from a subjective point of view

  • People sitting in shopping center rest area during workday from 11:11am
  • where /how /why people laughing in public space
  • List of shop signs
  • Things dangerous in the park
  • The sound that occurs when people enter a space
  • Things between curtains and windows

4/23

ESP32 WiFi Access Point with Web Server for LED Control and Sensor Monitoring

Create a WiFi Access Point (AP) using an ESP32 microcontroller. It sets up a web server on this AP to control an LED and display sensor readings (humidity and temperature) via a web interface.

/*
  WiFiAccessPoint.ino creates a WiFi access point and provides a web server on it.

  Steps:
  1. Connect to the access point "yourAp"
  2. Point your web browser to http://192.168.4.1/H to turn the LED on or http://192.168.4.1/L to turn it off
     OR
     Run raw TCP "GET /H" and "GET /L" on PuTTY terminal with 192.168.4.1 as IP address and 80 as port

  Created for arduino-esp32 on 04 July, 2018
  by Elochukwu Ifediora (fedy0)
*/

#include <DHT.h>
#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiAP.h>

#define DHTPIN 21
#define LED_BUILTIN 23   // Set the GPIO pin where you connected your test LED or comment this line out if your dev board has a built-in LED
    
#define DHTTYPE DHT22   
DHT dht(DHTPIN, DHTTYPE);

float hum;  //Stores humidity value
float temp;

// Set these to your desired credentials.
const char *ssid = "jungle";
const char *password = "myPassword";

WiFiServer server(80);


void setup() {
  pinMode(LED_BUILTIN, OUTPUT);

  Serial.begin(115200);
  Serial.println();
  Serial.println("Configuring access point...");
  dht.begin();

  // You can remove the password parameter if you want the AP to be open.
  // a valid password must have more than 7 characters
  if (!WiFi.softAP(ssid, password)) {
    log_e("Soft AP creation failed.");
    while(1);
  }
  IPAddress myIP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(myIP);
  server.begin();

  Serial.println("Server started");
}

void loop() {
  WiFiClient client = server.available();   // listen for incoming clients
  int sensorValue = analogRead(34);
  

  if (client) {                             // if you get a client,
    Serial.println("New Client.");           // print a message out 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
        if (c == '\n') {                    // if the byte is a newline character

          // if the current line is blank, you got two newline characters in a row.
          // that's the end of the client HTTP request, so send a response:
          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();

            hum = dht.readHumidity();  
            temp = dht.readTemperature(); 

            // the content of the HTTP response follows the header:
            client.print("<meta http-equiv='refresh' content='0.1'>");
            client.print("<style>body{background-color:purple;}</style><br>");
            
            int radius = map(hum, 30, 90, 0, 200);
            client.print("<style>.object{width:400px;height:400px;}</style><br>");
            client.print("<style>.object{border-radius:"+ String(radius)+"px;background-color:white; }</style><br>");

            client.print("<h1>eviltwin" + String(sensorValue) + "</h1><br>");
            client.print("<div class='object'></div><br>");
            client.print("Click <a href=\"/H\">here</a> to turn ON the LED.<br>");
            client.print("Click <a href=\"/L\">here</a> to turn OFF the LED.<br>");

            client.print("<p>Humidity: " + String(hum) + " %</p>");
            client.print("<p>Temperature: " + String(temp) + " °C</p>");

            

            // The HTTP response ends with another blank line:
            client.println();
            // break out of the while loop:
            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 to see if the client request was "GET /H" or "GET /L":
        if (currentLine.endsWith("GET /H")) {
          digitalWrite(LED_BUILTIN, HIGH);               // GET /H turns the LED on
        }
        if (currentLine.endsWith("GET /L")) {
          digitalWrite(LED_BUILTIN, LOW);                // GET /L turns the LED off
        }
      }
    }
    // close the connection:
    client.stop();
    Serial.println("Client Disconnected.");
  }
}