Servers and clients #
A server is a program that listens for requests from clients. When it receives requests, it replies to them.
A client is a program that makes requests of servers.
Implementation on microcontrollers #
There are zillions of ways to write servers and clients– lots of different programming languages, architectures, and libraries you could use. But, to narrow things down a little bit, here are a few places to start with the Raspberry Pi and Arduino.
Arduino MKR Wifi 1010 server #
Example code for WiFiNINA WiFiWebServer
Arduino MKR Wifi 1010 client #
Example code for WiFiNINAWiFi WebClient
Raspberry Pi server #
Raspberry Pi client #
Try using the Python library called Requests.
You can install it with:
sudo pip3 install requests
Your code might start like this:
import requests reply = requests.get('http://192.168.1.123/sensor/reading') print(reply.text)
Demo videos showing some client/server setup #
Check them out here