Read and compare command characters with Arduino Ethernet Shield

client.read() returns single byte.
https://www.arduino.cc/reference/en/libraries/ethernet/client.read/

A simple test sketch based on “Chat Server” example.

One gets following Serial monitor after sending a set of characters “ABCD” by, for example, socket.send(“ABCD”.encode(“utf-8”)) in a python script.



カテゴリー: 未分類 パーマリンク