RTC DS1307

Can you please give me a sample code on how to satisfy this condition: if time now = feeding time, activate pin 3. How would I do that given that I have an RTC?

Can you please give me a sample code on how to satisfy this condition

No. We have no idea which library you are using to read the clock. We have no idea what time feeding time is.

The last part is easy.

   digitalWrite(3, HIGH);

As PaulS has said what you want to do depends on the library you have used. I've dabbled in that with a DS1302 not a 1307, using Henning Karlsen's library.

There, you define a structure say t as Time.

Time t;

Then later you can read the current time into that structure:

t = rtc.getTime();

Then, you can compare the variable/s of the structure to your target time, say when the hour is 6:

if t.hour == 6 
//..... etc etc

You might need to have a flag to prevent you feeding a zillion times thru loop() since hour will be 6 for many many many passes.

Each time thru check the fed flag. First time through set the fed flag, and next time it's checked and found true, don't feed again, as long as hour is still 6.

First time the hour isn't 6, clear the fed flag so that it's ready for the next feeding time.

There may well be more elegant ways, but that worked for me.

And as I said it's based on Henning's 1302 library.... YMWV.

Have a look here

EDIT... I had s quick look at the manual for his 1307 library and it looks as if it has the same approach. So the above should work. Don't quote me 8)