Figure 3-6 Data display on the Arduino serial monitor
(7) data connection at the end: if you finished the above six steps successfully, congratulations, you are successful. The temperature measured by sensor LM35 has been successfully sent to the server on the internet by wifi module, as shown in Figrue 3-7.
Figure 3-7 Data display at server
Compared the temperature data shown in Figure 3-6 (local monitor) with Figure 3-7 (server at cloud), it is can be found that, both data are the same, which shows the data is transmitted successfully. In the next section, we will show the data handling to exhibit to people.
3.5 Key notes and summaries
(1) before configuring network parameters, to ensure the successful configuration, please recovery the wifi module to the default factory settings.
(2) please ensure the exactness of data configuration, especially the settings about mobile phone and server IP address.
(2) Look for the wifi networks
Figure 2-8 Look for the wifi network signal
After setting the relevant parameters by the above-mentioned step (1), we can find the wifi signal transmitted from wifi board according to the followings.
After power on the wifi board for about 30 seconds, the three LED lights would be exhibited normally. That is, LED1 is lighting with red all the time, LED2 is light with green all along as well, and LED3 is blinking with green light. The relevant context can be referred as shown in Section 2.3. Then, clicking the network icon, you would find there are many wireless network signals, where there is a named as HI_LINK_XXXX wifi signal, which is the wanted wireless wifi network signal. Therefore, we can double click such wifi signal, then it is needed to input password 12345678, which is the default password. If it is the first connection, it needs us to input the password, but thereafter, we may not input the password. Note that, the later 4 letters “XXXX” in the wifi signal name HI-LINK_XXXX is denoted by the different names, since their names may be different according to the different wifi devices. For example, in our such example, the name of wifi signal is HI-LINK_0021, which is also the same as the name encountered in the mobile phone. After double clicking the HI-LINK_0021 wifi signal and input the password, we can make the computer connect to the wifi module on the Arduino shield board, as shown in Figure 2-8.
According to 1), we can connect the wifi network HI-LINK_0021 transmitted from wifi module. Then, return to the network-serial assistant shown in Figure 2-6, click the “Open” button on the left serial setting, and click the “Connect” on the right wifi setting, which are denoted by opening the serial port COM6 and connecting wifi network HI-LINK_0021, as shown in Figure 2-9 with red label. Note that, if the serial port doesn’t open, or the wifi network doesn’t be connected, the buttons “Open” and “Connect” would not work normally, and thus we cannot change the states of buttons “Open” and “Connect”. In other word, “Open” cannot be changed into “close”, and “Connect” cannot be changed into “disconnect”.
Figure 2-9 open the serial port and connect wifi network
After connecting the serial port and wifi networks by Figure 2-10, we can transmit and receive data between serial port and wifi module, as shown in Figure 2-11. When we send a digital number “1″ at serial port, then we can receive “1″ at wifi network. Similarly, if sending “1″ at wifi networks, we can receive “1″ at serial port. Thus, we have realized the normal communication between serial port and wifi network.
Figure 2-10 WIFI connection based on Arduino shield board
Figure 2-11 Communication between serial port and wifi network