Keine Beschreibung
|
|
||
|---|---|---|
| .devcontainer | ||
| .forgejo/workflows | ||
| static | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| Makefile | ||
| README.md | ||
GoPiPump
Building the app locally
Clone the repo to your machine and run this command inside the folder
$ make rpi
This will create an executable in the build folder in the repo.
Build Windows
$ make windows
RPI Setup
User need access to device
Beispiel-Frontend-Integration (AJAX)
In deiner index.html könntest du z. B. so den Status abrufen:
async function fetchStatus() {
const res = await fetch("/api/status");
const data = await res.json();
console.log("Status:", data);
document.querySelector("#actualPressure").textContent = data.pressure_actual + " bar";
}
🔌 Beispiel-JSON für /api/parameters (POST) { "steps": [ { "pressure1": 1000, "speed1": 10, "hold1": 50, "pressure2": 200, "speed2": 10, "hold2": 50, "cycles": 10 }, { "pressure1": 600, "speed1": 10, "hold1": 50, "pressure2": 300, "speed2": 10, "hold2": 50, "cycles": 10 } ] }