Improved Client Server Framework for Arduino

In this lesson, we show an improved framework for creating a Client/Server connection between your Arduino and your desktop PC over WiFi. This will serve as the basis for our WiFi projects moving forward.  On the arduino side, we have the following code to create the Server:

Remember, you must create a new tab, and include the following as your ‘secrets.h’ file

And then, on the Desktop side, this will be your python ‘Client’ code: