Forum Members section DIY Ferduino controller HDP3.TXT is empty

HDP3.TXT is empty  [SOLVED]

Ask here about your controller made with pieces purchased in other shops.

Post Number:#1 Post Mon Jul 07, 2014 11:43 pm
Posts: 32
Topics: 4
Solve rating: 0
Joined: Thu Jul 03, 2014 10:55 am
Topics: 4
Age: 43
Gender: Male
National Flag:
Brazil
hi guys, archive HDP3.TXT save empty why? some HDP3.TXT other HDPx.TXT save correct.

Post Number:#2 Post Tue Jul 08, 2014 9:50 am
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

You're using latest version?

I can't help with old version because I haven't here to test.

Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#3 Post Tue Jul 08, 2014 10:09 am
Posts: 32
Topics: 4
Solve rating: 0
Joined: Thu Jul 03, 2014 10:55 am
Topics: 4
Age: 43
Gender: Male
National Flag:
Brazil
Hi!

You're using latest version?

I can't help with old version because I haven't here to test.

Best regards.



yes fernando downloaded yesterday the download links and version in Portuguese only nozzle 3 TXT Records put blank without information.

The following code ProcessMyTouch.ino

stretch where the file records

if((temp2hora_final_dosagem_personalizada_3 == hora_inicial_dosagem_personalizada_3) && (temp2minuto_final_dosagem_personalizada_3 >= (minuto_inicial_dosagem_personalizada_3+10)))
          {
            dispScreen =21;
            clearScreen();
            selecionar_dosadora();
            setFont(SMALL, 255, 255, 255, 0, 0, 0);

            strcpy_P(buffer, (char*)pgm_read_word_near(&(tabela_textos[171])));
            myGLCD.print(buffer, 15, 220); // tabela_textos[171] = "MODO PERSONALIZADO SELECIONADO"

            modo_manual = false;
            modo_personalizado = true;
            modo_calibrar = false;
            dosadora_selecionada = 0x0;

            selecionar_SPI(SD_CARD); // Seleciona disposito SPI que será utilizado.
            file.open(&root, "HDP3.TXT", O_WRITE);
            file.remove();       
            file.open(&root, "HDP3.TXT", O_CREAT | O_APPEND | O_WRITE);

            minuto01 = NumMins(hora_final_dosagem_personalizada_3, minuto_final_dosagem_personalizada_3) - NumMins(hora_inicial_dosagem_personalizada_3, minuto_inicial_dosagem_personalizada_3);
            minuto01 /= 1 + quantidade_dose_dosadora_3_personalizada;

            for(int i = 1; i <= quantidade_dose_dosadora_3_personalizada; i++)
            {
              contador += 1; 
              if(contador == 1)
              {
                minuto11 = NumMins(hora_inicial_dosagem_personalizada_3, minuto_inicial_dosagem_personalizada_3) + minuto01;
              }
              if(contador > 1)
              {
                minuto11 += minuto01;
              }
              if(minuto11 < 10)
              {
                file.print("000"); 
                file.print(minuto11);
                file.write((uint8_t*)"\0", 1);
                writeCRLF(file);
              }
              else if(( minuto11 > 10) && (minuto11 < 100))
              {
                file.print("00");
                file.print(minuto11);
                file.write((uint8_t*)"\0", 1);
                writeCRLF(file);
              }
              else if(( minuto11 >= 100) && (minuto11 < 1000))
              {
                file.print("0");
                file.print(minuto11);
                file.write((uint8_t*)"\0", 1);
                writeCRLF(file);
              }
              else if(minuto11 >= 1000)
              {
                file.write((uint8_t*)"\0", 1);
                writeCRLF(file);
              }
            }
            file.close(); 
            contador = 0;

            Salvar_dosadora_EEPROM();
          }   

          if(temp2hora_final_dosagem_personalizada_3 > hora_inicial_dosagem_personalizada_3)
          {
            dispScreen =21;
            clearScreen();
            selecionar_dosadora();
            setFont(SMALL, 255, 255, 255, 0, 0, 0);

            strcpy_P(buffer, (char*)pgm_read_word_near(&(tabela_textos[171])));
            myGLCD.print(buffer, 15, 220); // tabela_textos[171] = "MODO PERSONALIZADO SELECIONADO"

            modo_manual = false;
            modo_personalizado = true;
            modo_calibrar = false;
            dosadora_selecionada = 0x0;

            selecionar_SPI(SD_CARD); // Seleciona disposito SPI que será utilizado.
            file.open(&root, "HDP3.TXT", O_WRITE);
            file.remove();       
            file.open(&root, "HDP3.TXT", O_CREAT | O_APPEND | O_WRITE);

            minuto01 = NumMins(hora_final_dosagem_personalizada_3, minuto_final_dosagem_personalizada_3) - NumMins(hora_inicial_dosagem_personalizada_3, minuto_inicial_dosagem_personalizada_3);
            minuto01 /= 1 + quantidade_dose_dosadora_3_personalizada;

            for(int i = 1; i <= quantidade_dose_dosadora_3_personalizada; i++)
            {
              contador += 1; 
              if(contador == 1)
              {
                minuto11 = NumMins(hora_inicial_dosagem_personalizada_3, minuto_inicial_dosagem_personalizada_3) + minuto01;
              }
              if(contador > 1)
              {
                minuto11 += minuto01;
              }
              if(minuto11 < 10)
              {
                file.print("000"); 
                file.print(minuto11);
                file.write((uint8_t*)"\0", 1);
                writeCRLF(file);
              }
              else if(( minuto11 > 10) && (minuto11 < 100))
              {
                file.print("00");
                file.print(minuto11);
                file.write((uint8_t*)"\0", 1);
                writeCRLF(file);
              }
              else if(( minuto11 >= 100) && (minuto11 < 1000))
              {
                file.print("0");
                file.print(minuto11);
                file.write((uint8_t*)"\0", 1);
                writeCRLF(file);
              }
              else if(minuto11 >= 1000)
              {
                file.print(minuto11);
                file.write((uint8_t*)"\0", 1);
                writeCRLF(file);
              }
            }
            file.close(); 
            contador = 0;

            Salvar_dosadora_EEPROM();
          }         
        }
      }     

Post Number:#4 Post Tue Jul 08, 2014 10:25 am
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

It works for me.

You're selecting a quantity of dose higher than zero?

Check if the quantity is right on menu "Show config.".
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#5 Post Tue Jul 08, 2014 10:55 am
Posts: 32
Topics: 4
Solve rating: 0
Joined: Thu Jul 03, 2014 10:55 am
Topics: 4
Age: 43
Gender: Male
National Flag:
Brazil
It works for me.

You're selecting a quantity of dose higher than zero?

Check if the quantity is right on menu "Show config.".


Yes it does not put any value in saving this interesting archive only for nozzle 3 and it seems that the program is crashing every 30 ... 40 seconds then comes back and displays the level of the aquarium as normal even if I do not have meter level although this is another problem I do not know if can be linked.

In the Show settings appears okay however there is however the SD file it has no content.

Post Number:#6 Post Tue Jul 08, 2014 11:32 am
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Try add message of debug:

Replace:

file.open(&root, "HDP3.TXT", O_CREAT | O_APPEND | O_WRITE);


With:

if(file.open(&root, "HDP3.TXT", O_CREAT | O_APPEND | O_WRITE))
{
  Serial.println("File opened!");
}


Replace:

if(minuto11 < 10)


with:

Serial.print("Time: ")
Serial.println(minuto11);

if(minuto11 < 10)


and it seems that the program is crashing every 30 ... 40 seconds then comes back and displays the level of the aquarium as normal even if I do not have meter level although this is another problem I do not know if can be linked.


You're talking that changes the text or the arduino makes reboot.

Change the text is normal if you haven't a sensor connected.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#7 Post Tue Jul 08, 2014 2:51 pm
Posts: 32
Topics: 4
Solve rating: 0
Joined: Thu Jul 03, 2014 10:55 am
Topics: 4
Age: 43
Gender: Male
National Flag:
Brazil
Try add message of debug:

Replace:

file.open(&root, "HDP3.TXT", O_CREAT | O_APPEND | O_WRITE);


With:

if(file.open(&root, "HDP3.TXT", O_CREAT | O_APPEND | O_WRITE))
{
  Serial.println("File opened!");
}


Replace:

if(minuto11 < 10)


with:

Serial.print("Time: ")
Serial.println(minuto11);

if(minuto11 < 10)


and it seems that the program is crashing every 30 ... 40 seconds then comes back and displays the level of the aquarium as normal even if I do not have meter level although this is another problem I do not know if can be linked.


You're talking that changes the text or the arduino makes reboot.

Change the text is normal if you haven't a sensor connected.


I'll debug this way to pass information, which does not understand is why only for nozzle 3? very strange.

Got about the text, the Arduino seems to hang for a few seconds (I speak of + 20sec.) And then back to work ..

Post Number:#8 Post Tue Jul 08, 2014 2:57 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

I think that's related with ethernet shield.

You have:

boolean Ethernet_Shield = true;


or:

boolean Ethernet_Shield = false;


?

The code was done to ENC28J60 and you have W5100, so the right is:


boolean Ethernet_Shield = false;


Also you can use the version with web control that's compatible with the W5100.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#9 Post Tue Jul 08, 2014 3:14 pm
Posts: 32
Topics: 4
Solve rating: 0
Joined: Thu Jul 03, 2014 10:55 am
Topics: 4
Age: 43
Gender: Male
National Flag:
Brazil
I think that's related with ethernet shield.

You have:

boolean Ethernet_Shield = true;


or:

boolean Ethernet_Shield = false;


?

The code was done to ENC28J60 and you have W5100, so the right is:


boolean Ethernet_Shield = false;


Also you can use the version with web control that's compatible with the W5100.


Use:
boolean Ethernet_Shield = true;


Need change to
boolean Ethernet_Shield = false;
right?

thus the W5100 works? SD say do not worry about the internet function because I do not use but with the
 boolean Ethernet_Shield = false;
will work?

Post Number:#10 Post Tue Jul 08, 2014 3:32 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

The W5100 no works with original code.

Need of changes to work with the Xively.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#11 Post Tue Jul 08, 2014 3:57 pm
Posts: 32
Topics: 4
Solve rating: 0
Joined: Thu Jul 03, 2014 10:55 am
Topics: 4
Age: 43
Gender: Male
National Flag:
Brazil
The W5100 no works with original code.

Need of changes to work with the Xively.


At this point I just want the metering and other functions working, communication with the internet does not need for now this way with the original code I can use metering / SD card with the W5100? or should I migrate the code to the version with webserver?

Post Number:#12 Post Tue Jul 08, 2014 4:03 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

SD card works with:

 boolean Ethernet_Shield = false;
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#13 Post Tue Jul 08, 2014 7:42 pm
Posts: 32
Topics: 4
Solve rating: 0
Joined: Thu Jul 03, 2014 10:55 am
Topics: 4
Age: 43
Gender: Male
National Flag:
Brazil
SD card works with:

 boolean Ethernet_Shield = false;


solved .... updated to the web version and everything is okay now ... I have the code that works xively with the previous version without werserver working with the W5100 if someone wants to pm or if you want I'll step Fernando.

Thanks again for the support and attention Fernando.




Return to DIY Ferduino controller





Who is online

Users viewing this topic: No registered users and 1 guest