From 6f28e10550abe6feb996ab472c8202f190543fc4 Mon Sep 17 00:00:00 2001 From: Oliver Klag <3003075@stud.hs-mannheim.de> Date: Mon, 23 Nov 2026 00:26:14 +0100 Subject: [PATCH] Update README.md --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/README.md b/README.md index e69de29..b83b812 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,59 @@ +## Setup for simulation + +Install the programming language `Go` from this website: +https://go.dev/doc/install - This is needed for the local webserver. + +Clone the `repository`: +https://gitty.informatik.hs-mannheim.de/3003075/UCPS_WS26-27.git + +Install `Arduino IDE`: +https://docs.arduino.cc/software/ide/ + +--- + +Start a `WiFi Hotspot` from a phone and connect to it with the laptop or PC you will host the server from. + +You can open the project in `Visual Studio Code` or just go to the folder `UCPSMain` through the terminal. + +If go is already installed, you have to run the command `go run main.go`. +This should start the local webserver on the connected WiFi hotspot. + +The terminal (or the embedded terminal in VS Code) will display the IP of your hotspot: + +```cmd +PS C:\Your\folder\location\UCPSMain> go run main.go +Heating server is running. Addresses of this PC (adapter name in brackets): + http://26.220.79.179:8080 [Radmin VPN] + http://192.168.X.X:8080 [WiFi] <--- YOUR HOTSPOT IP +Use the address of your Wi-Fi adapter (connected to the phone hotspot) as SERVER_IP in the Arduino sketch. +``` + +The server is always running on port `8080`, no changes needed there. + +You can open the file `UCPSMain.ino` in the Arduino IDE or in VS Code. + +There are three things you need to change: + +1. In `line 9` you have to type in the name of your hotspot: +```ino +const char wifiSSID[] = "YourHotspotName"; +``` +2. In `line 10` you have to type in your password: +```ino +const char wifiPASS[] = "YourHotspotPassword"; +``` +3. In `line 14` you have to enter the IP that was displayed in the terminal, where you are running your server. +```ino +const char SERVER_IP[]   = "192.168.X.X"; +``` + +After changing these 3 things, connect your PC or Laptop to your `Arduino Board` with the USB cable and upload the changed code. + +Do `NOT` change anything else in the code! + +If everything done correctly, you can access the website through the IP and the port given: +`http://192.168.X.X:8080/` + +There you will see every live data that is coming from the Arduino, including the Temperature Sensor and if the heating element is turned on or off. + +In the top right corner you can check, if the Arduino Board is connected or not. You can also test, if the heating element turns on, if the temperature is too low by turning it from `Automatik` to `Manuell` and then going to `Temparatur selbst auswählen`. Just set a really high temperature and see if the heating element turns on. The website should also display `Heizung ist an` in the top left corner. \ No newline at end of file