How to rotate servo every 12 hours using RTC module? I am trying to make a auto fish feeder to feed my fish every 6hours. I want to implement RTC module to my code. So far I've been using only an arduino and a servo using this as a code:
#include &lt;Servo.h&gt;

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
  myservo.write(15);
}

void loop() {
  for (pos = 0; pos &lt;= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for (pos = 180; pos &gt;= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
      // Wait for 12h
    delay(6 * 3600000);
}

The RTC module I have is the DS1302. It's library cn be downloaded here
The code for the clock is this:
// DS1302_Serial_Hard 
// Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved
// web: http://www.RinkyDinkElectronics.com/
//
// A quick demo of how to use my DS1302-library to 
// retrieve time- and date-date for you to manipulate.
//
// I assume you know how to connect the DS1302.
// DS1302:  CE pin    -&gt; Arduino Digital 2
//          I/O pin   -&gt; Arduino Digital 3
//          SCLK pin  -&gt; Arduino Digital 4

#include &lt;DS1302.h&gt;

// Init the DS1302
DS1302 rtc(2, 3, 4);

// Init a Time-data structure
Time t;

void setup()
{
  // Set the clock to run-mode, and disable the write protection
  rtc.halt(false);
  rtc.writeProtect(false);
  
  // Setup Serial connection
  Serial.begin(9600);

  // The following lines can be commented out to use the values already stored in the DS1302
  rtc.setDOW(FRIDAY);        // Set Day-of-Week to FRIDAY
  rtc.setTime(12, 0, 0);     // Set the time to 12:00:00 (24hr format)
  rtc.setDate(6, 8, 2010);   // Set the date to August 6th, 2010
}

void loop()
{
  // Get data from the DS1302
  t = rtc.getTime();
  
  // Send date over serial connection
  Serial.print(&quot;Today is the &quot;);
  Serial.print(t.date, DEC);
  Serial.print(&quot;. day of &quot;);
  Serial.print(rtc.getMonthStr());
  Serial.print(&quot; in the year &quot;);
  Serial.print(t.year, DEC);
  Serial.println(&quot;.&quot;);
  
  // Send Day-of-Week and time
  Serial.print(&quot;It is the &quot;);
  Serial.print(t.dow, DEC);
  Serial.print(&quot;. day of the week (counting monday as the 1th), and it has passed &quot;);
  Serial.print(t.hour, DEC);
  Serial.print(&quot; hour(s), &quot;);
  Serial.print(t.min, DEC);
  Serial.print(&quot; minute(s) and &quot;);
  Serial.print(t.sec, DEC);
  Serial.println(&quot; second(s) since midnight.&quot;);

  // Send a divider for readability
  Serial.println(&quot;  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -&quot;);
  
  // Wait one second before repeating :)
  delay (1000);
}

So the question here is, how can I set up my code to work with RTC, in order to move the servo every 6 hours?
You have to spend some time and practice coding, it does not come over night. As far as your timing look up for an alarm clock sketch that will do what you want.  Once you understand that you should only have to add a few lines of code. As far as open source the tools you are using are open source. Remember there are people out there that are expertes and there people just starting so expect what you find to fall some in that range of quality.