Lend a hand with Arduino Venture
Mainly, that is an arduino uno mission the place I need to construct an automated puppy feeder by which the consumer can enter when he/she desires the meals to be distributed, and it compares it to a RTC chip. When it reaches the time, it turns on an archimedes screw, which dispenses meals. Alternatively, I stay on getting “Compilation error: no matching serve as for name to ‘DS3231::DS3231(const uint8_t&, const uint8_t&)” and I don’t have any clue why. I’m only a scholar looking to prototype for slightly aspect mission, so any assist could be liked. Additionally, if this factor is resolved, any ideas on the best way to incorporate a serve as the place the consumer can enter the time period between each and every feeding thru a 4×3 keypad as a substitute of handiest doling out meals one time in step with day. Moreover, any ideas could be a great deal liked.
Portions concerned:
Arduino Uno
Arduino Motor Defend REV3
4×3 Matrix Keypad
DS3231 RTC Chip
16×2 LCD Display
NEMA 17 Stepper Motor
This is my code:
#come with <DS3231.h>
#come with <Stepper.h>
#come with <LiquidCrystal.h>
#come with <Keypad.h>
#come with <Cord.h>
int dirA = 12;
int dirB = 13;
int pwmA = 3;
int pwmB = 11;
// Claim a Stepper motor with 200 steps
Stepper stepper1(200, dirA, dirB);
const byte ROWS = 4; // Outline the collection of rows at the keypad
const byte COLS = 3; // Outline the collection of columns at the keypad
char keyinitials;
char keys[ROWS][COLS] = { // Matrix defining personality to go back for each and every key
{‘1′,’2′,’3’},
{‘4′,’5′,’6’},
{‘7′,’8′,’9’},
{‘*’,’0′,’#’}
};
byte rowPins[ROWS] = {8, 7, 6, 5}; //connect with the row pins (R0-R3) of the keypad
byte colPins[COLS] = {4, 3, 2}; //connect with the column pins (C0-C2) of the keypad
//initialize an example of sophistication
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
DS3231 rtc(A4, A5);
LiquidCrystal liquid crystal display (A0, A1, A2, 11, 12, 13);
int t1, t2, t3, t4, t5, t6;
boolean feed = true;
char key;
int r[6]={0};
void setup() {
rtc.start();
liquid crystal display.start(16,2);
Serial.start(9600);
// PWM pins require declaration when used as Virtual
pinMode(pwmA, OUTPUT);
pinMode(pwmB, OUTPUT);
// Set PWM pins as all the time HIGH
digitalWrite(pwmA, HIGH);
digitalWrite(pwmB, HIGH);
// Set stepper motor velocity
stepper1.setSpeed(60);
}
void loop(){
liquid crystal display.setCursor(0,0);
keyinitial = kpd.getKey();
char x;
if (key==’*’)
{
setFeedingTime();
}
liquid crystal display.print(“Time: “);
String t = “”;
t = rtc.getTimeStr();
t1 = t.charAt(0)-48;
t2 = t.charAt(1)-48;
t3 = t.charAt(3)-48;
t4 = t.charAt(4)-48;
t5 = t.charAt(6)-48;
t6 = t.charAt(7)-48;
liquid crystal display.print(rtc.getTimesStr());
liquid crystal display.setCursor(0,1);
liquid crystal display.print(“Date: “);
liquid crystal display.print(rtc.getDateStr());
if (t1==r[0] && t2==r[1] && t3==r[2] && t4==r[3]&& t5<1 && t6<3 && feed==true)
{
stepper1.step(300);
feed = false;
}
void setFeeding Time()
{
feed = true;
int i=0;
liquid crystal display.transparent();
liquid crystal display.setCursor(0,0);
liquid crystal display.print(“Set feeding Time”);
liquid crystal display.transparent();
liquid crystal display.print(“HH:MM”);
liquid crystal display.setCursor(0,1);
whilst(1){
key = kpd.getKey();
char j;
if(key!=NO_KEY){
liquid crystal display.setCursor(j,1);
liquid crystal display.print(key);
r[i] = key-48;
i++;
j++;
if (j==2)
{
liquid crystal display.print(“:”); j++;
}
lengthen(500);
}
if (key == ‘#’)
{key=0; spoil; }
}
}
View Reddit through storm_n – View Supply