O2OA platform was built

O2OA development environment is very simple, after the installation of the server can be developed through the browser and use. For details, please refer to other documents in the documentation library. There are more detailed introductions, which will not be repeated here.

Build Arduino development environment

Install the Arduino IDE

The first step is to download and install the Arduino IDE from Arduino’s official website.

Download address: www.arduino.cc/en/software

Once installed, we can use the Arduino IDE to develop directly, but the official IDE is not very easy to use, so we can do some experimental examples, but it is a little difficult to develop a real project. In my experience, using VS Code’s Arduino plug-in and Eclipse-based Sloeber are good choices.

VS Code integrates Arduino

Download and install VS Code without further details, after installation, go to “Extensions”, search for “Arduino”, install “Arduino for Visual Studio Code”, The Microsoft one.

Once the installation is complete, go to preferences (Ctrl+,) and search for “Arduino” and enter your Arduino IDE installation directory in “Arduino: Path” :

So our VS Code is ready for Arduino development.

Install development board

We use the ESP8266 development board for development, so we need to install the ESP8266 development board file.

Press F1, search for “Arduino”, open “Arduino: Board Manager”

Then search for ESP8266, select the latest version, and click Install.

After installation, support for various development boards for the ESP8266 chip was added.

Installation library file

We need to use some libraries in our project, such as DHT22 temperature reading library, WebSocket connection library, Json parsing library, etc., all need to be installed in advance. Installing the Library is also very simple. Press F1, search for “Arduino”, and open “Arduino Library Manager”.

Then search the required library name. For example, ArduinoJson library is used in our project to parse JSON, so search “ArduinoJson” here.

Select the latest version and click Install.

Once the library is installed, there are usually some EXAMPLES, which can be found in “ARDUINO EXAMPLES” in the lower left corner

In a project like ours, the following libraries need to be installed:

  • ArduinoJson (An efficient and elegant JSON library for Arduino) by Benoit Blanchon

  • WebSockets (WebSockets for Arduino) by Markus Sattler

  • SimpleDHT (Arduino Temp & Humidity Sensors for DHT11 etc) by Winlin

  • DallasTemperature (Arduino Library for Dallas Temperature ICs) by Miles Burton

Install the driver

At this point, we connected the ESP8266 development board to the computer through mirco USB cable, but the operating system might not be able to identify the device, so the USB-to-serial CH340 driver needs to be installed. You can search for drivers based on different operating systems and install them.

At this point, our required development environment is in place, and the next step is to move on to actual development.