Publish data to WebSocket server in JSON format
Simulink Support Package for Arduino Hardware / WiFi
If the WebSocket Server is hosted on Arduino hardware, any device on the network can connect to the server and access the data.
Arduino MKR WIFI 1010
Arduino Nano 33 IoT
This figure shows the signals in JSON format.
If the JSON string size is more than 1024 bytes, the published data is replaced with the error messages.
Signal— Input data to be published
The signal data to be published to the WebSocket server, specified as a row vector.
The block provides an option to add up to 10 Signal input ports that you can use to obtain signal data, with each signal being a row vector.
Server port— Port number on WebSocket server
9000(default) | any port number
Specify the port number on the WebSocket server on which the JSON data is hosted.
Number of Inputs— Total number of input signal connections
Select the total number of input signal connections to the block, which is then converted to JSON format.