Dangerous Prototypes

Other projects => Past projects => Web platform => Topic started by: alex99 on April 04, 2012, 09:18:00 pm

Title: Adding SD logging capabilities
Post by: alex99 on April 04, 2012, 09:18:00 pm
Hi there,

I managed to make my web server work very smoothly and I manipulated many
dynamic variables through my web browser.
My question is how can I log each event (i.e: pressing a button to light a led) on my SD card in
a text file??

Thank you,
Title: Re: Adding SD logging capabilities
Post by: tayken on April 05, 2012, 05:10:12 am
Check out SD card libraries from Microchip Application Libraries. They should be included already actually. My guess is write a function which looks for a log file, if it does not exists, creates it, then appends the message passed to it to the end of the file. Then you call this function from the custom functions which are called from the web page.
Title: Re: Adding SD logging capabilities
Post by: alex99 on April 05, 2012, 02:25:14 pm
Thank you for your reply,
That was helpful
Title: Re: Adding SD logging capabilities
Post by: alex99 on April 07, 2012, 05:17:14 pm
Hi again,

I've created a function to test writing to the SD card, but when I try to build my project I get a:
"Link Error: region program is full"
Does anyone have an idea about this kind of errors??

Thank you!
Title: Re: Adding SD logging capabilities
Post by: robots on April 07, 2012, 06:01:21 pm
The idea is, that your linked program won't fit into flash.
Title: Re: Adding SD logging capabilities
Post by: ian on April 17, 2012, 05:47:26 pm
Hi Alex,

Glad to hear you made progress with dynamic variable.

Quote
"Link Error: region program is full"

Did you declare any big buffers for the SD card? That might take up too much memory, or perhaps the flash is full? What are the specs (on space, memory) spit out by the compiler?

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00972066264session_write_close ( )...(null):0
20.01002197856ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01002198632Database_MySQL->query( ).../DatabaseHandler.php:119
40.05542337368Database_MySQL->error( ).../Db-mysql.class.php:273