(5 intermediate revisions by 3 users not shown) | |||
Line 12: | Line 12: | ||
<div class="container content"> | <div class="container content"> | ||
<div class="headstyle"> | <div class="headstyle"> | ||
− | <h1 class="head">Wi-Fi | + | <h1 class="head">Wi-Fi Module</h1> |
</div> | </div> | ||
<div class="righttitle"> | <div class="righttitle"> | ||
− | <h6 class="subtitle"> | + | <h6 class="subtitle"></h6> |
</div> | </div> | ||
<div class="navbar-example"> | <div class="navbar-example"> | ||
Line 33: | Line 33: | ||
<img class="contentimg col-12" src="https://static.igem.org/mediawiki/2018/9/9b/T--NCKU_Tainan--wifi_sensor.jpg"> | <img class="contentimg col-12" src="https://static.igem.org/mediawiki/2018/9/9b/T--NCKU_Tainan--wifi_sensor.jpg"> | ||
<p class="pcontent"> | <p class="pcontent"> | ||
− | About this section, we are showing how to use the Wi-Fi | + | About this section, we are showing how to use the Wi-Fi module in arduino. |
</p> | </p> | ||
<div id="Motivation"> | <div id="Motivation"> | ||
Line 40: | Line 40: | ||
<div id="pt"> | <div id="pt"> | ||
<p class="pcontent"> | <p class="pcontent"> | ||
− | In order to send data to firebase, we use Wi- | + | In order to send data to firebase, we use Wi-Fi module to upload it. |
</p> | </p> | ||
</div> | </div> | ||
Line 60: | Line 60: | ||
<ul> | <ul> | ||
<li class="none">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- | + | to send the Arduino sensor data to Wi-Fi module, and send the Wi-Fi |
time data to Arduino.</li></br> | time data to Arduino.</li></br> | ||
</ul> | </ul> | ||
Line 67: | Line 67: | ||
<ul> | <ul> | ||
− | <li class="none">We use Arduino TX to send sensor data to Wi- | + | <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- | + | And we use Wi-Fi TX to send time data to Arduino RX, then print it on |
LCD. </li></br> | LCD. </li></br> | ||
+ | <h5 class="smalltitle">Wi-Fi (Node mcu) Code</h5> | ||
+ | <div style="overflow: auto; width:100%; height:250px; background-color:#272625; border:3px solid #a6a6a6;"> | ||
+ | <script src="https://gist.github.com/yiiju/2f96c728a52ab2fa5c03a4145cc6da81.js"></script> | ||
+ | </div> | ||
</ul> | </ul> | ||
Line 83: | Line 87: | ||
<li>Result</li></br> | <li>Result</li></br> | ||
<ul> | <ul> | ||
− | <li class="none">We send an array which is 25.35、26.56、27.54 from Arduino to Wi- | + | <li class="none">We send an array which is 25.35、26.56、27.54 from Arduino to Wi-Fi module. And |
− | we let the Wi- | + | we let the Wi-Fi module 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> | ||
</ul> | </ul> | ||
Line 95: | Line 99: | ||
<li class="none">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 | + | into pH value, temperature and CO<sub>2</sub> concentration, and upload the translated |
result to the cloud. </li></br> | result to the cloud. </li></br> | ||
</ul> | </ul> | ||
Line 106: | Line 110: | ||
<ol> | <ol> | ||
<li>Arduino UNO</li> | <li>Arduino UNO</li> | ||
− | <li>Wi- | + | <li>Wi-Fi module (NodeMcu)</li> |
<li><a href="https://github.com/vicky87106/2018iGEM_NCKU-Tainan" style="color:#28ff28;">Arduino | <li><a href="https://github.com/vicky87106/2018iGEM_NCKU-Tainan" style="color:#28ff28;">Arduino | ||
Code</a></li> | Code</a></li> |
Latest revision as of 14:19, 3 November 2018
Wi-Fi Module