ahmed ismail
Published © CERN-OHL

Aquarium Controlling and Monitoring with Arduino and 1Sheeld

ET fishbowl is a smart controlled robot that automatically feeds your fish at a given time, control light, oxygen, filter & water level.

IntermediateFull instructions provided3 hours4,122

Things used in this project

Story

Read more

Code

Code snippet #4

Plain text
<p>hour = Clock.getHours();</p><p> minute = Clock.getMinutes();
 second = Clock.getSeconds();
if(hour == xx && minute == xx && second == xx) //change hours, minute,second to the desired time;
  {</p><p>// code                   //fully described in the code;<br> }
if(hour == xx && minute == xx && second == xx )  //change hours, minute,second to the desired time;
{
//code                    //fully described in the code;<br> }</p>

Code snippet #10

Plain text
<p>const char firstCommand[]="hello";<br>const char secondCommand[]="control servo";
const char thirdCommand[]="turn on light";
const char fourthCommand[]="turn off light";
const char fifthCommand[]="turn on filter";
const char sixthCommand[]="turn off filter";
const char oxygen_openCommand[]="turn on oxygen";
const char oxygen_closeCommand[]="turn off oxygen";
const char seventhCommand[]="add";
const char eighthCommand[]="remove";
const char ninthCommand[]="yes";
const char tenthCommand[]="no";</p>

Code snippet #13

Plain text
<p>hour = Clock.getHours();  <br>minute = Clock.getMinutes();
second = Clock.getSeconds();</p><p>if(hour == xx && minute == xx&& second == xx)  // change hours, minute,second to the desired time
  {
// code           / /  fully described in the code  (control servo position)</p><p>  <br> }
if(hour == xx && minute == xx && second == xx )    
  {
//code           / /  fully described in the code file  (control servo position)<br>   }</p>

Code snippet #19

Plain text
<p>void servo (byte sliderValue)<br>
{
  pos=sliderValue*90/255;       // scale convert from (0 to 255) to (0 to 90 degree) 
  myservo.write(pos);           // tell servo to go to position in variable 'pos' 
  delay(2);
}</p>

Code snippet #23

Plain text
LCD.setCursor(0,0);        //Set the cursor to begin writing from the first row and first column.<p> LCD.print("temp = ");<br> int value = analogRead(tempPin); 
 float mv = ( value/1024.0)*5000; 
 float cel = mv/10;
 LCD.setCursor(0,7);                // Set the cursor to begin writing from the first row and 8 column.
 LCD.print(cel);                         // Print cel value
 LCD.setCursor(1,0);                // Set the cursor to begin writing from the second row and first column.
 LCD.print("water level= ");       // Print water level= .
 LCD.setCursor(1,12);              // Set the cursor to begin writing from the second row and column 13.
 LCD.print( analogRead(A1));  // Print water level value .</p>

Credits

Khlaled ET

Posted by ahmed ismail

Comments