Is my project feasible? Fish feeder

Hello everyone,

I will be performing an associative learning experiment where I will try to see if fish can associate a light with a food reward. Given that this is nature of my experiment, I will need the feeder to stick to a very strict schedule. I would like to feeder to feed at 10 AM, 12 PM, 2 PM, and 4 PM, then stop for the day until the next morning at 10 AM, then pick up on the schedule of 12 PM, then 2 PM, etc.

So far, I will be using: an Arduino UNO, two Micro Servos (2730765), a ring of LED lights in a circular plastic tube, and a DS3231 RTC.

I will be using the two example sketches: Blink and Sweep

My fish will be subject to different treatments. Some will have the LEDs light up and the servo deliver the food reward simultaneously. For others, there will be light delays (i.e. 5 sec after light goes on, 10 sec after light goes on) for when the servo goes on.

Will my project work? I am very new to Arduino however my research has led me down this path. Does anyone have any tips? Would it be as simple as combining the Blink + Sweep code then adding in RTC time references?

Related code attached:

void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}
#include <Servo.h> 
 
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 
} 
 
void loop() 
{ 
  for(pos = 0; pos <= 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>=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 
  } 
}

Your project s feasable per se but do not use the blink example or any other code that utilities the delay() function. That is to ask for trouble when doing anything else besides very simple examples.

Also the timing accuracy of the arduino is not very exact so you might consider a RTC

tholos has an RTC module, but is just wondering how to get it to work and use it for the feeder.