Forum Software Ferduino code Temperature and locks wavemaker

Temperature and locks wavemaker  [SOLVED]


Post Number:#1 Post Sun Oct 05, 2014 7:31 am
Posts: 101
Topics: 22
Solve rating: 0
Joined: Wed Sep 10, 2014 7:07 pm
Topics: 22
Age: 49
Gender: None specified
National Flag:
Italy
I noticed that when I connect the temperature probes the wavemaker mode 1 has the block about every 5 seconds pretty obvious

can be improved so that everything is more linear?

thanks

Post Number:#2 Post Sun Oct 05, 2014 10:16 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!

This is not a problem.

The Atmega isn't multitask so when you see a small pause on graphs it mean that the controller is doing others things.

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 Sun Oct 05, 2014 4:40 pm
Posts: 101
Topics: 22
Solve rating: 0
Joined: Wed Sep 10, 2014 7:07 pm
Topics: 22
Age: 49
Gender: None specified
National Flag:
Italy
thanks

I can set the reading parameters from 5 seconds to 10 seconds?

there are problems?

Post Number:#4 Post Mon Oct 06, 2014 10:40 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!

On loop find:

if (millis() - previousMillis > 5000)


Replace with:

if (millis() - previousMillis > 10000)


In the tab "parametros" find:

  if(contador_temp == 12)
  {
    tempC = temperatura_agua_temp / 12;
    tempH = temperatura_dissipador_temp / 12;
    tempA = temperatura_ambiente_temp / 12;


Replace with:

  if(contador_temp == 6)
  {
    tempC = temperatura_agua_temp / 6;
    tempH = temperatura_dissipador_temp / 6;
    tempA = temperatura_ambiente_temp / 6;


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:#5 Post Mon Oct 06, 2014 5:03 pm
Posts: 101
Topics: 22
Solve rating: 0
Joined: Wed Sep 10, 2014 7:07 pm
Topics: 22
Age: 49
Gender: None specified
National Flag:
Italy
thanks

I know why I have to change this code also ?????????

 if(contador_temp == 12)
  {
    tempC = temperatura_agua_temp / 12;
    tempH = temperatura_dissipador_temp / 12;
    tempA = temperatura_ambiente_temp / 12;


in this

if(contador_temp == 6)
  {
    tempC = temperatura_agua_temp / 6;
    tempH = temperatura_dissipador_temp / 6;
    tempA = temperatura_ambiente_temp / 6;

Post Number:#6 Post Mon Oct 06, 2014 5:21 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

Because 60 seconds / 10 seconds = 6, so the temperature will be updated to each 60 seconds.
Otherwise 12 * 10 seconds = 120 seconds, of this way the temperature will be updated to each 120 seconds.
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 Oct 07, 2014 8:59 am
Posts: 101
Topics: 22
Solve rating: 0
Joined: Wed Sep 10, 2014 7:07 pm
Topics: 22
Age: 49
Gender: None specified
National Flag:
Italy
thanks

but I do not understand

with 5 seconds was 12

I have to put with 10 seconds to 6

Post Number:#8 Post Tue Oct 07, 2014 9:59 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

12 * 5 = 60 seconds.

Only ask is very easy.

Look the code and try learn.

void checkTempC()
{
contador_temp ++;
sensors.requestTemperatures(); // Chamada para todos os sensores.
temperatura_agua_temp += (sensors.getTempC(sensor_agua)); // Lê temperatura da água
temperatura_dissipador_temp += (sensors.getTempC(sensor_dissipador)); // Lê temperatura do dissipador
temperatura_ambiente_temp += (sensors.getTempC(sensor_ambiente)); // Lê temperatura do dissipador

if(contador_temp == 12)
{
tempC = temperatura_agua_temp / 12;
tempH = temperatura_dissipador_temp / 12;
tempA = temperatura_ambiente_temp / 12;
contador_temp = 0;
temperatura_agua_temp = 0;
temperatura_dissipador_temp = 0;
temperatura_ambiente_temp = 0;
}
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.




Return to Ferduino code





Who is online

Users viewing this topic: No registered users and 1 guest

cron