Jenny860831 (Talk | contribs) |
Oscarliu117 (Talk | contribs) |
||
Line 54: | Line 54: | ||
<ul> | <ul> | ||
− | <li>We need to send data from one sensor to another one. We would like | + | <li class="none">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 | to send the Arduino sensor data to Wi-fi sensor, and send the Wi-fi | ||
time data to Arduino.</li></br> | time data to Arduino.</li></br> | ||
Line 62: | Line 62: | ||
<ul> | <ul> | ||
− | <li>We use Arduino TX to send sensor data to Wi-fi RX, then upload data to | + | <li class="none">We use Arduino TX to send sensor data to Wi-fi RX, then upload data to |
<a href="https://2018.igem.org/Team:NCKU_Tainan/Software#Database" style="color:#28ff28;">database</a>. | <a href="https://2018.igem.org/Team:NCKU_Tainan/Software#Database" style="color:#28ff28;">database</a>. | ||
And we use Wi-fi TX to send time data to Arduino RX, then print it on | And we use Wi-fi TX to send time data to Arduino RX, then print it on | ||
Line 70: | Line 70: | ||
<li>Precaution</li></br> | <li>Precaution</li></br> | ||
<ul> | <ul> | ||
− | <li>Because we cannot send data by float, so we need to separate the data before | + | <li class="none">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 | 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 | it on another sensor. For instance, 25.35 may be merged by 25 + 0.01 * 35 | ||
Line 78: | Line 78: | ||
<li>Result</li></br> | <li>Result</li></br> | ||
<ul> | <ul> | ||
− | <li>We send an array which is 25.35、26.56、27.54 from Arduino to Wi-fi sensor. And | + | <li class="none">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. | 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. </li></br> | Then we merge the data to what it should be originally. </li></br> | ||
Line 88: | Line 88: | ||
<ul> | <ul> | ||
− | <li>We check the format of the header and end of the packet and also check if there | + | <li class="none">We check the format of the header and end of the packet and also check if there |
are 6 values in each packet. If it had, we translate the contents of the packet | are 6 values in each packet. If it had, we translate the contents of the packet | ||
into pH value, temperature and CO2 concentration, and upload the translated | into pH value, temperature and CO2 concentration, and upload the translated |
Revision as of 13:51, 17 October 2018
Wi-Fi Sensor