The Internet:
The Internet of Things (IoT) & Industry 4.0 (IR4.0) has changed the way we work & it has been a trending field in the world of technology. Physical items/objects and the digital world are connected now more than ever.
IoT & IR4.0 is often lumped together & rightly so; one couldn't possibly exist without the other. The Internet of Things involves adding digital sensors and networking technologies to the devices and systems that we use every day in the real world.
Whereas, Industry 4.0 refers to the use of automation and data exchange between machines & factories to streamline the manufacturing process resulting in the so-called "Smart Factory". These Smart factories brought about benefits ranging from improving energy usage, improving the factory's output to making manufacturing safer.
Modifying out CockroachBot:
Our C3 CoreModule has another trick up its sleeve, with a bit of effort. We can bring our C3 CoreModule online via any open 2.4GHz WIFI connection.
In this chapter, we are going to A) Bring our C3 CoreModule online, as well as B) implement a web server on the C3 CoreModule with capability to handle WebSocket communication protocol as well.
When you complete everything, our CockroachBot will be able to serve a web page allowing you to control its movement remotely.

(Disclaimer) Server-Client setup/topology:
Unfortunately, we do not have sufficient time in this workshop to cover the ins & outs of the internet & its relevant protocol. This workshop will only discuss & uses IPv4 & WebSocket protocol for only one type of server-client setup.
It is by no means the best & only way to accomplish the task at hand BUT let's just go along with it & enjoy the result. This method is relatively easy to work with & the resulting firmware is lightweight (perfect for microcontrollers).
About Web Servers:
Traditional everyday web server is a computer on the internet that stores, processes, and delivers web pages to web clients (your web browser). The communication between client and server uses a special protocol known as Hypertext Transfer Protocol (HTTP).
In this protocol, a client initiates communication by making a request for a specific web page using an HTTP request call, and the server responds with the content of that web page.
Read up more about HTTP at: Wiki
RFC (Request for Comment): RFC: 2616
What will happen if the page being requested is not found?
About WebSockets:
The WebSocket is an extension to the well-known HTTP protocol. The protocol allows you to create real-time connections between web servers and clients.
We have no shortage of client here; most modern web-browser is fully capable of handling WebSocket traffic. The WebSocket API is so widespread that any modern smartphone OS(es) will have the protocol supported out of the box.
While the original HTTP protocol only allows servers to send data upon a client request, the WebSockets form a persistent connection, enabling bi-directional communication between server and client. This change allows for web applications to efficiently exchange data in real-time without the overhead of conventional HTTP connections.
Read up more at: Wiki
IP Addresses & Port numbers:
IPv4 addresses are 32 bit binary addresses divided into 4 octets (an octet represents one byte / 8-bit quantity) used by the Internet Protocol (OSI Layer 3) for delivering packet to a device located in the same or remote network.
e.g. 192.168.0.1
Read up more about IP Address at: Wiki
Every computer is able to run multiple network applications (or processes) at the same time and an IPv4 address alone cannot distinguish between different network applications running on the computer. So, TCP port numbers provide an address for the network application/processes running in your computer.
e.g. 216.58.221.196: 80
Read up more at: Wiki
List of well known port numbers: Wiki


Additional library:
In order to get our C3 CoreModule to operate a WebSocket enabled Web server, we would need an additional WebSocket Library to be installed into our Arduino IDE.
1) WebSockets by Links2004 (Markus Settler): Github
The name is a bit generic, so please make sure you get the right library from Arduino's Library Manager.

Todo: