As shown in the Initialize function the keyword LABEL is used to write the first ROW of the Excel sheet.Recording data and analyzing them is a common practice in most of the industries, here we are building Arduino Data Logger Project where we will learn how we can log data at a specific interval of time.
We will use an Arduino board to read some data (here temperature, humidity, date and time) and save them on a SD card and the computer simultaneously. To maintain the date and time we will use the famous RTC module DS3231 and to get the Temperature and Humidity we will use the DHT11 Sensor. The pins 4 and 7 are defined as the CS pin and output pin by Arduino program, you can change them to any other pin if required. We previously interfaced SD card with Arduino in Music player project. Arduino Output To Excel Install Them BasedFollow the link to download the file and install them based on your operating system. This should have created a folder named PLS-DAQ on your desktop. Arduino Output To Excel Code As SimpleI have tried my best to keep the code as simple as possible and the explanations are also given through comment sections. ![]() This module has its own coin cell power supply using which it maintains the date and time even when the main power is removed or the MCU has gone though a hard reset. So once we set the date and time in this module it will keep track of it always. It can be done by simply removing the comments as mentioned above and writing the date and time. Make sure you comment them back and upload it, else each time you run the board the date and time will be set again. You can also use RTC IC DS1307 for reading the time with Arduino. It sends the values of temperature and humidity as an 8-bit data serially through the output pin of the module. ![]() Also check this DHT11 based Arduino Temperature Measurement. In the SD card initialize function we will create a text file named LoggerCD.txt and write the first row of our content. Meaning when a comma is placed it means we have to move to the next cell in the Excel sheet. With the help of the DS3231 library and the DHT11 library our Arduino will be capable of reading all these four parameters and storing them into the following parameters as shown in table below. You can simply use the date and time running on your Laptopcomputer and save them directly on Excel. Serial.println(CLEARDATA); clears up any data left from previous projects. Serial.println(LABEL,Date,Time,Temperature,Humidity); always write LABEL, to indicate it as first line.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |