A simple C++ App to communicate with Arduino or any other micro controller via serial port and shut a windows PC down. Examples included are HTML GUI for ESP32 with SPIFFS and simple serial sketch.
The following dependancies are needed for the ESP32 sketch, not for the simple one.
Install Arduino IDE and the dependancies. Open the .ino
and set the upload settings and hit upload.
After that, for ESP32, click on ESP32 Sketch data upload to upload the data to SPIFFS.
Connect the ESP32 to PC and connect to ESP32 WiFi access point (aka hotspot) and visit 192.168.4.1.
Run the WindowsClient.exe
and click on shutdown.
Edit the \\\\.\\COM1
in the WindowsClient.cpp
char *port_name = "\\\\.\\COM1"
Open up device manager
, go to the Ports (COM & LPT)
then select correct device, click on properties, then port settings
then advanced and then port number
.