Forum Software Ferduino code Wavemake

Wavemake  [SOLVED]


Post Number:#1 Post Sat Sep 13, 2014 6:29 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
hi

you can change the way one of the wavemaker so that the minimum power is 30% and not 0%?

make from 30% to 100%

Post Number:#2 Post Sun Sep 14, 2014 3:12 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

Hi!

Welcome Simone!

In the tab "wavemaker" find:

  if(modo_selecionado == 1)
  {
    value = int(128 + 127 * sin(2  *  PI / periodo * times));
    Pump1PWM = 255 - value;
    Pump2PWM = value;


Add after:

    Pump1PWM = map(Pump1PWM, 0, 255, 77, 255);
    Pump2PWM = map(Pump2PWM, 0, 255, 77, 255);


Find:

  else if(modo_selecionado == 2)
  {
    value = int(128 + 127 * sin(2  *  PI / periodo * times));


Add after:

 value = map(value, 0, 255, 77, 255);


Find:

Pump1PWM += 50;


Replace with:

Pump1PWM += 77;


Find:

Pump2PWM += 50;


Replace with:

Pump2PWM += 77;


The mode 3 never will be smaller than 50%.

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 Mon Sep 15, 2014 3:43 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
thank you very nice

I try with these changes that I've listed

I ask you one other thing

You can insert a pause button to put the pumps during the meal to the fish?

thanks

Post Number:#4 Post Mon Sep 15, 2014 4:22 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

Hi!

Try this:

Image


Add in ferduino tab:

unsigned long interval_feed_millis = 0;
int interval_feed = 10; // in minutes
boolean feed_mode = false;


Add on loop:

if(feed_mode == true)
{
  if((millis() - interval_feed_millis) > (interval_feed*60000))
  {
    feed_mode = false;
  }
}


in ProcessyMyTouch find:

    case 0:                       //Tela de inico
      dispScreen=30;
      clearScreen();
      solicitar_senha();
      break;


Replace with:

    case 0:                       //Tela de inico
      if(((x > 0)  &&  (x < 399)  &&  (y > 0)  &&  (y < 138)) || ((x > 128) && (x < 399) && (y >= 138) && (y < 239)))
      {
        dispScreen=30;
        clearScreen();
        solicitar_senha();
        break;
      }
      else
      {
        feed_mode = true;
        interval_feed_millis = millis();
      }


in "wavemaker" find:

  analogWrite(wavemaker1, Pump1PWM);
  analogWrite(wavemaker2, Pump2PWM);


Replace with:

  if(feed_mode == true)
  {
    analogWrite(wavemaker1, 0);
    analogWrite(wavemaker2, 0);
  }
  else
  {
    analogWrite(wavemaker1, Pump1PWM);
    analogWrite(wavemaker2, Pump2PWM);
  }


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 Sep 15, 2014 5:30 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
I have the break in WaveMaker night at that point as I change to have both?

here is what I

if ((bled_out == 0) && (wled_out == 0) && (rbled_out == 0) && (rled_out == 0) && (uvled_out == 0))

{
 
    analogWrite (wavemaker1, int (Pump1PWM * 0.3));
  analogWrite (wavemaker2, int (Pump2PWM * 0.3));
  }
  else
  {
    analogWrite (wavemaker1, int (Pump1PWM * 0.8));
  analogWrite (wavemaker2, int (Pump2PWM * 0.8)); 
  }
}
Last edited by Fernando Garcia on Mon Sep 15, 2014 9:07 pm, edited 2 times in total.
Reason: Added tag to code

Post Number:#6 Post Mon Sep 15, 2014 6:10 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

Please, use the tags below to post any code on forum.

Image


  if(feed_mode == true)
  {
    analogWrite(wavemaker1, 0);
    analogWrite(wavemaker2, 0);
  }
  else
  {
    if ((bled_out == 0) && (wled_out == 0) && (rbled_out == 0) && (rled_out == 0) && (uvled_out == 0))
    {
      analogWrite (wavemaker1, int (Pump1PWM * 0.3));
      analogWrite (wavemaker2, int (Pump2PWM * 0.3));
    }
    else
    {
      analogWrite (wavemaker1, int (Pump1PWM * 0.8));
      analogWrite (wavemaker2, int (Pump2PWM * 0.8));
    }
  }
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 Mon Sep 15, 2014 7:05 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
by an error in the compilation:


Webserver.ino: In function 'void Wavemaker()':
Webserver:2: error: a function-definition is not allowed here before '{' token
Webserver:588: error: expected `}' at end of input

Post Number:#8 Post Mon Sep 15, 2014 9:16 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

My code haven't any error.
Check your changes.
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 Sep 16, 2014 4:02 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
ok thanks I was able to correct

but I do not understand how to put the pumps break to feed the fish

thanks

Post Number:#10 Post Tue Sep 16, 2014 5:02 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

Simple!

Touch the area marked in red in the image above.
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 Sep 16, 2014 6:29 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
ok thanks it works fine

Sight is not possible to create a button on the menu 2? labeled food

thanks


else

because with the Italian written some words are cut? example


RISCALDATORE I see him cut RISCALDATO

thanks

Post Number:#12 Post Tue Sep 16, 2014 6:48 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

All is possible.

I'll not make it for you.

Try learn a bit.

The problem with texts is to other topic.
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