Thursday 11 December 2014

Serial Monitor with Data logging....

Arduino IDE has an Built-in Serial Monitor. It is a good way to print the some data and debug the program.

what if we wanted to save the monitoring data.. like log the temperature of room in a 12 hours or something like that..?

Serial Monitor come with Arduino IDE doesn't have a data logging capabilities.. so we need an alternative to that..

we can program in python or matlab to save the data... But as a Newbie i only know Arduino Language. I didn't know even know the C or C++ more than Arduino Language.

So I need a much simpler one with out any further coding...

the program I am using with arduino for simple data logging is putty.
it is sufficient enough for simple data logging
you can download it from here
download the exe file and install it.
after installing when you open it it look like


change the connection type to Serial and specify the serial line(com) and speed(baud rate) for com 10 and 9600 baud rate the setting will look like this


click on the Logging and change the following settings as shown in images below



we can change the serial line settings in the Serial category as shown in fig.

then load the following code into the arduino.. using arduino IDE

void setup() {
Serial.begin(9600);
Serial.println("Anil");
}

void loop() {
Serial.println("Kunchala");
delay(1000);

software_reset();
}
void software_reset(){
Serial.println("Do you want to print again?");
Serial.println("enter y or n");
while(!Serial.available()){
}
char in_char = Serial.read();
if (in_char == 'y'){
//if receivd character is y then Reset the arduino
asm volatile("jmp 0");
}
else{
//else call the function to repeat the same procedure
software_reset();
}
}


this code is from my previous post.. you Can Find it in Here

then Close IDE and Open PUTTY configure the above settings and click OPEN

and the log is saved in my desktop file named Putty like this..

No comments:

Post a Comment