NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Writing Data to File

November 21, 2010
by Proton
Proton's Avatar

is it possible to write the data returned from the ATmega168 tempsensor project to a file on the computer, instead of just being displayed on LCD or computer screen? If so, how is it done?

i noticed this in the main program
// write message to serial port printf_P(PSTR("%.2f degrees Frn"), temp_avg);

how can this be converted to be stored in a file?

Regards,

Proton

November 21, 2010
by Ralphxyz
Ralphxyz's Avatar

You need to write a program that will listen on the Com Port and capture the content.

Python is a popular scripting language here on the forum and is used by the Nerdkit guys for their projects.

Any programing language could be used that knows how to listen to the Com ports.

You probable could use some of the scripts from the Tutorials with minor modifications to write to a file.

Ralph

Post a Reply

Please log in to post a reply.

Did you know that you can make a spooky Halloween Jack-O-Lantern with a microcontroller? Learn more...