This example shows how MyViz, running on your computer, can communicate with an ESP8266 (ESP-01) through Websockets.
The files can be downloaded for the following systems:
- Windows: https://github.com/3sigma/MyViz_Tutorials/tree/master/Tutorials_Windows/Websocket_1
- Linux: https://github.com/3sigma/MyViz_Tutorials/tree/master/Tutorials_Linux/Websocket_1
- Mac OS X: https://github.com/3sigma/MyViz_Tutorials/tree/master/Tutorials_OSX/Websocket_1
In order to run this example, you need to follow these steps (provided that MyViz is already installed):
- Download the files somewhere on your computer
- Download and install the following Arduino libraries, in order to use Json format and Websockets in the sketch you will download on your ESP-01:
- Connect your ESP-01 to your programmer
- Upload on this module the sketch “Tutorial_Websocket_1.ino”, located in the “ESP8266_ESP01” folder of the archive
- Start you ESP-01 with GPIO0 and GPIO2 connected together
- Connect your computer to the Wifi Access Point created by the ESP-01. The credentials are:
- SSID: MyViz
- Password: myvizesp8266
- Run MyViz. It opens with an empty window:
- Click on “Load Dashboard” and open the file “Tutorial_Websocket_1.json”, located in the “Dashboard” folder of the archive. You can now play with this interface:
- You can:
- click on the GPIO2 switch to switch on or off the GPIO0 pin connected to GPIO2
- move the slider, to see the plot of the value sent back by the board
- To edit the dashboard, click on the icon on the top-middle of the window. Then you can modify any widget and learn how MyViz works: