Wi-Fi Sensor
About this section, we are showing how to use the Wi-Fi sensor in arduino.
Motivation
In order to send data to firebase, we use Wi-fi sensor to upload it.
Experiments
- Purpose
- We need to send data from one sensor to another one. We would like to send the Arduino sensor data to Wi-fi sensor, and send the Wi-fi time data to Arduino.
- Method
- We use Arduino TX to send sensor data to Wi-fi RX, then upload data to database. And we use Wi-fi TX to send time data to Arduino RX, then print it on LCD.
- Precaution
- Because we cannot send data by float, so we need to separate the data before and after the decimal. For instance, 25.35 may be send by 25 and 35. Then merge it on another sensor. For instance, 25.35 may be merged by 25 + 0.01 * 35
- Result
- We send an array which is 25.35、26.56、27.54 from Arduino to Wi-fi sensor. And we let the Wi-fi sensor Serial to print the data which are send separately. Then we merge the data to what it should be originally.
- Materials used
- Arduino UNO
- Wi-fi sensor (NodeMcu)
- Arduino Code
Wiring