Just ignore all above methods and let us see the simplest possible method, as given below. Instantly the graph will be displayed as follows.For that click on “Insert” menu and then select “Line” graph option.Insert one row above the data entries and give headings to the two columns as Temperature and Humidity, as shown below.Since your data entries are imported into MS Excel in two columns, you can now create graph of the entries.Finally click “Finish” and now your TXT file will be converted into two columns in Microsoft Excel table, as shown below.Now as shown below, deselect “Tab” option and select “Comma” option, then click “Next”.Select “Delimited” button and then click “Next”.Now it will show you your text file generated by CoolTerm.Then click on “All files” in bottom right corner as shown below and select “Text Files (*.prn, *.txt, *.csv)”. Now open Microsoft Excel and click “Open” in its menu.You must have the txt file, generated by CoolTerm either on desktop or in a folder.This will complete data logging process.Once you have sufficient data entries, click on “Connections”, go to “Capture to Text/Binary File” and click on “Stop”.The first entry of 26 is the temperature and the second entry of 31 is the humidity value Finally click on “Connect” button of CoolTerm application to start recording the data entries in the text file, as shown below.Now a new window will open where you have write the name of the file.Click on “Connections” in menu, go to “Capture to Text/Binary File” and click on “Start”, as shown below.This field should show you the COM port number to which your Arduino is connected to. Click on “Options” menu and then click on “Port”.In my case, it is connected to COM3 port. Just note down the COM port to which your Arduino is connected to. Do not open Serial Monitor or Serial Plotter.Now connect your Arduino board through data cable to your PC and upload the code in Arduino UNO or Arduino nano.Open the folder and right click on CoolTerm.exe icon and create desktop shortcut on your PC.After downloading, unzip the file and copy the folder inside the zip file on your PC.Download CoolTerm data logger software from this link (File size: 20MB).Now that you are ready with the code, follow these steps – Since we used Serial.println() in this third line, due to carriage return, the next two values will be printed in next line and so on… Download Data logging software Then the third line prints “Humidity” value. The first line in above code prints the “Temperature” value and the second line puts a comma (,) after the Temperature value. This is because we have to import the Serial data with comma delimited values in Excel file. It is important to note the following piece of code used to print the Serial data. Then go to “Include Library” and then click on “Add. To add the downloaded zipped file, open Arduino IDE and click on “Sketch” menu. Note: To run this code in Arduino IDE you will need DHT library. Humidity = DHT.humidity // reading humidityĭelay(1000) // create reading log at every second Temperature = DHT.temperature // reading temperature Int Humidity // variable to store humidity value Int Temperature // variable to store temperature value Int output=7 // connect output pin of DHT11 to pin-7 To understand the process of saving Arduino Serial data in txt, csv and Excel file, we will use a simple Arduino code which uses Serial.print() commands. For that we will use a simple code, as follows. Now suppose we have create log of real time temperature and humidity, using DHT11 sensor with Arduino. So this article explains how to save Arduino Serial data in TXT, CSV and Excel file without using data logger shield? The use of data logger shield in Arduino is rather critical and everyone may not have the data logger shield readily available to create the log of readings in Arduino.
0 Comments
Leave a Reply. |