 
 
 
+/**** debug functions ****/
+
+/*
+int availableMemory() {
+    // Use 1024 with ATmega168
+    int size = 2048;
+    byte *buf;
+    while ((buf = (byte *) malloc(--size)) == NULL);
+        free(buf);
+    return size;
+}
+*/
+
+
+
 /**** arduino default functions ****/
 
 void setup(void) {
-        Serial.begin(115200);
-
-         while (!Serial) {
-                 ; // wait for serial port to connect. Needed for Leonardo only
-        }
-        
-        Serial.println("test!!!");
         
 	// setup the screen
-	ds_screen.begin();  
+	ds_screen.begin();
 
 #ifdef PROG_VERBOSE
         Serial.println(DATASAFE_MESSAGE_000);

	// show the data
	ds_screen.showDataScreen();

	// sd.showFile("test.txt");

	delay(3000);



void loop()
{
//        Serial.println(availableMemory());
        
	// working with the state pattern because we have different screens (states)
	switch (current_state) {
	case STATE_RESET:              
