kittikom_waithayawan
Published © GPL3+

K.M's Automatic Fish Feeder

It's simply, cheap and easy to manage.

BeginnerShowcase (no instructions)2,270
K.M's Automatic Fish Feeder

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

how to circuit

It's simple. EZ

Code

Code for K.M automatic fish feeder

C/C++
EZ
#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 <= 20; 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(5);                       // waits 15ms for the servo to reach the position
  }
  for (pos = 20; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(5);                       // waits 15ms for the servo to reach the position
  }
delay(480* 60 * 1000UL);

Credits

kittikom_waithayawan
0 projects • 1 follower

Comments