Thingiverse
Automatic fish feeding device
por pepperl
51
Descargas
34
Likes
0
Makes
Sorry for my poor English!
You need an Arduino(NANO,MINI,UNO、、、)
And a 28BYJ48 stepper
If your fish food's diameter more than 2mm, you will need a little Screw(prt0003)
Arduino Code
//#include "Stepper.h"
//#define STEPS 100
Stepper stepper(STEPS, 2, 3, 4, 5);//CHANGE TO YOUR PIN
int previous = 0;
long interval = 7200000L;//Interval ,HOW LONG, 7200000L MEAN 2 HOURS
unsigned long previousMillis = 0;
void setup()
{
stepper.setSpeed(80);
}
void loop()
{
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval) {
previousMillis = currentMillis;
stepper.step(3500); //HOW MUCH
}
if(currentMillis < previousMillis){ //OVERFLOW CHECK
previousMillis=currentMillis;
}
}
You need an Arduino(NANO,MINI,UNO、、、)
And a 28BYJ48 stepper
If your fish food's diameter more than 2mm, you will need a little Screw(prt0003)
Arduino Code
//#include "Stepper.h"
//#define STEPS 100
Stepper stepper(STEPS, 2, 3, 4, 5);//CHANGE TO YOUR PIN
int previous = 0;
long interval = 7200000L;//Interval ,HOW LONG, 7200000L MEAN 2 HOURS
unsigned long previousMillis = 0;
void setup()
{
stepper.setSpeed(80);
}
void loop()
{
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval) {
previousMillis = currentMillis;
stepper.step(3500); //HOW MUCH
}
if(currentMillis < previousMillis){ //OVERFLOW CHECK
previousMillis=currentMillis;
}
}
¿Has impreso este modelo? Inicia sesión y comparte tu make.
Inicia sesión para dejar un comentario
Iniciar sesiónAún no hay comentarios – ¡sé el primero!