Automatic Dog (or cat) Treat Dispenser with Arduino | Science Project

Science Buddies
18 Apr 202413:54

Summary

TLDRThis video tutorial demonstrates how to construct an automatic dog treat dispenser using an Arduino. It can be programmed for timed treat release, sensor-based interaction, or button-press training. The dispenser operates by rotating pre-loaded treat compartments over a hole, allowing treats to slide down a ramp into a tray. The project uses a Servo motor and real-time clock, with potential for customization using various sensors. Viewers can find a detailed parts list and circuit diagram in the description for those interested in building this at home.

Takeaways

  • ๐Ÿ› ๏ธ The video demonstrates building an automatic dog treat dispenser using an Arduino, which can be programmed for various functions.
  • โฐ The dispenser uses a real-time clock to track time and can be set to dispense treats at specific times of the day.
  • ๐Ÿ”ง The mechanical design includes a hopper with compartments that rotate over a hole, allowing treats to slide down a ramp into a tray.
  • ๐Ÿ“ฆ For practical use, the dispenser should be made of sturdy, washable materials or placed out of the pet's reach to avoid damage from slobber.
  • ๐Ÿ”ฉ The circuit includes components like a potentiometer for the LCD screen, a reset button, and optional LED and buzzer for alerts.
  • ๐Ÿ“ The Arduino code provided can be customized for different behaviors, such as dispensing treats at set times or responding to sensors.
  • ๐Ÿ” Arduino's compatibility with various sensors allows for customization, such as motion detectors or magnet sensors for pet interaction.
  • ๐Ÿ”‘ The script includes a detailed explanation of the code, including the use of libraries, setting up the real-time clock, and the loop function for treat dispensing.
  • ๐Ÿ”„ The servo motor is programmed to rotate the compartments in increments, ensuring smooth movement and treat delivery to the tray.
  • ๐Ÿ”’ The code includes a safety feature that requires a button press to reset the dispenser after all treats have been dispensed.
  • ๐Ÿ”— Additional resources such as tutorials for different sensors and a parts list are available through links in the video description.

Q & A

  • What is the main purpose of the automatic dog treat dispenser project?

    -The main purpose of the project is to build an automatic dog treat dispenser using an Arduino, which can be programmed to dispense treats at certain times of the day, react to sensors that detect the dog's presence, or even train the dog to push a button.

  • How does the treat dispensing mechanism work in the device?

    -The treat dispensing mechanism works by preloading the food or treats into compartments in a hopper. A servo motor rotates the compartments one at a time, and as each compartment rotates, it goes over a hole allowing the treats to slide down a ramp into a tray at the front.

  • Why is the cardboard prototype not suitable for a real pet environment?

    -The cardboard prototype is not suitable for a real pet environment because the slobber from the pet would quickly ruin the paper, making it unsuitable for direct use.

  • What are the alternatives if one wants to use the dispenser at home for their pet?

    -The alternatives include placing the dispenser high on a counter or shelf where the pet can't reach it, allowing treats to drop below, or building a more robust and washable version of the dispenser.

  • What is the role of the potentiometer in the circuit?

    -The potentiometer is used to adjust the contrast on the LCD screen, which is necessary if one wants a readout of time and instructions.

  • What are the additional components that could be used to enhance the dispenser's functionality?

    -Additional components like a reset button, LED, and buzzer can be used to enhance functionality, such as alerting the pet with a sound when a treat has been dispensed.

  • How can the dispenser be customized to train or reward certain behaviors?

    -The dispenser can be customized to train or reward certain behaviors by using a variety of sensors compatible with Arduino, such as motion detectors, distance sensors, or magnet sensors that can detect a magnetic tag on the pet's collar.

  • What is the significance of the real-time clock in the Arduino for this project?

    -The real-time clock in the Arduino is significant as it keeps track of the time, allowing the device to dispense treats automatically at certain times of the day.

  • How can one modify the code to dispense treats at different times of the day?

    -One can modify the code by changing the conditions in the if statement to match the desired times of day when the treats should be dispensed, using the hour, minute, and second variables.

  • What is the purpose of the angle increment variable in the code?

    -The angle increment variable determines the angle by which the servo rotates with each step, which corresponds to the number of compartments in the hopper. It needs to be adjusted based on the number of compartments to ensure the servo rotates correctly.

  • How does the code handle the end of the treat dispensing cycle?

    -The code handles the end of the treat dispensing cycle by resetting the servo to its initial position and displaying a 'press button to restart' message on the LCD screen, waiting for the user to press the button to start the next cycle.

Outlines

00:00

๐Ÿค– Building an Arduino-based Automatic Dog Treat Dispenser

This paragraph introduces a project to create an automatic dog treat dispenser using an Arduino. The device can be programmed to dispense treats at specific times, react to sensors that detect the dog's presence, or even be trained to respond to a button press by the dog. The mechanism involves a hopper with preloaded treats and a servo motor that rotates the compartments over a hole, allowing treats to slide down a ramp into a tray. The video demonstrates a prototype made of cardboard, which is not suitable for direct use by pets due to slobber damage, suggesting the need for sturdier, washable materials for a real-life application. The paragraph also mentions the possibility of receiving a notification to reset the dispenser after all treats have been dispensed.

05:01

๐Ÿ”ง Exploring the Mechanical Design and Circuitry of the Dispenser

The second paragraph delves into the mechanical design of the treat dispenser, describing the use of popsicle sticks glued at 45ยฐ angles to create compartments attached to a servo horn. It details the assembly of the cardboard structure, including the servo motor attached through a hole in the cardboard, and the use of cardstock for legs and ramp leading to the treat tray. The paragraph also discusses the circuitry involved, mentioning a potentiometer for LCD screen contrast adjustment, an LCD screen for time readout, and optional components like a reset button, LED, and buzzer. The Arduino is highlighted for its versatility with various sensors, allowing customization for different behaviors or presence detection methods. The paragraph concludes with an invitation to view a cleaner circuit diagram and parts list in the video description.

10:02

๐Ÿ’ป Coding the Dispenser for Timed Treat Distribution

The final paragraph focuses on the coding aspect of the project, explaining the use of the Arduino Uno R4 Minima with a built-in real-time clock and the necessary libraries for the servo control and optional LCD display. It outlines the process of setting up the code with constant variables for pins and time units, and the setup function for pin modes and initializing the LCD and serial communication. The loop function is described, detailing how it checks for specific second intervals to rotate the servo and dispense treats, with adjustments possible for different times of day or sensor-based triggers. The paragraph also discusses the servo angle increment based on the number of compartments and the importance of slowing down the servo motion for smooth operation. Additional functions for LED flashing and buzzer sounding, as well as time retrieval and LCD updating, are mentioned, with the promise of more detailed instructions and example code available through provided links.

Mindmap

Keywords

๐Ÿ’กArduino

Arduino is an open-source electronics platform based on easy-to-use hardware and software. It is used to build interactive projects, such as the automatic dog treat dispenser in the video. The Arduino Uno R4 Minima, mentioned in the script, is a specific model that includes a built-in real-time clock, which is essential for the project's functionality to dispense treats at certain times of the day.

๐Ÿ’กServo motor

A Servo motor is a type of motor that allows for precise control of its position. In the context of the video, the Servo motor is used to rotate the compartments of the treat dispenser one at a time, ensuring that treats are dispensed in a controlled manner. The script describes how the Servo motor is attached to a cardboard structure to achieve this.

๐Ÿ’กReal-time clock

A real-time clock (RTC) is a timekeeping device that maintains the current time even when the system is powered off. In the video, the Arduino uses an RTC to keep track of time and dispense treats at specific intervals, such as every 15 seconds for demonstration purposes.

๐Ÿ’กCompartments

In the script, compartments refer to the individual sections in the treat dispenser that hold the dog treats. They are preloaded with food and rotate over a hole, allowing treats to slide down a ramp into a tray. The compartments are made from popsicle sticks glued together at 45ยฐ angles, creating a structure that can hold multiple treats.

๐Ÿ’กRamp

A ramp in this context is a sloping surface that allows the treats to slide from the compartments to the tray below. It is made from card stock and is an essential part of the dispenser's design, facilitating the smooth movement of treats from the storage area to the dispensing area.

๐Ÿ’กCircuit diagram

A circuit diagram is a visual representation of an electrical circuit that shows the components and their interconnections. The video script mentions a messy circuit on a breadboard, and a cleaner version of the circuit diagram is provided in the description for those who want to replicate the project. It is crucial for understanding how the components of the treat dispenser are wired together.

๐Ÿ’กSensors

Sensors in the video refer to devices that can detect various types of input from the environment and are used to customize the treat dispenser. Examples given include motion detectors, distance sensors, and magnet sensors that can be used to detect the dog's presence or train the dog to interact with the dispenser. The script suggests that sensors can make the dispenser more interactive and responsive to the pet's behavior.

๐Ÿ’กCustomization

Customization in the context of the video means adapting the treat dispenser to specific needs or behaviors. The Arduino's compatibility with various sensors allows for the dispenser to be tailored to dispense treats based on different triggers, such as the pet's presence or actions. The script encourages viewers to explore different sensors and customize the code to create a personalized treat-dispensing experience.

๐Ÿ’กLCD screen

An LCD (Liquid Crystal Display) screen is used in the video to provide a visual readout of time and instructions. While it is not necessary for the basic operation of the dispenser, it can enhance the user experience by displaying information such as the time of day or prompts to reset the dispenser.

๐Ÿ’กCode

Code in this context refers to the programming instructions written for the Arduino to control the operation of the treat dispenser. The script walks through the code that is responsible for the dispenser's timing mechanism and includes comments about how the code can be modified for different use cases or with additional sensors.

๐Ÿ’กDebounce

Debounce is a technique used in electronics to ensure that a single input (like a button press) is not accidentally detected multiple times due to noise or contact bounce. In the script, the concept is applied to the button used to reset the dispenser, ensuring that the button press is accurately detected and does not cause unintended behavior.

Highlights

The video demonstrates building an automatic dog treat dispenser using an Arduino.

The dispenser can be programmed to dispense treats at specific times or in response to sensors detecting the dog's presence.

The device uses a Servo motor to rotate compartments filled with treats over a hole, allowing treats to slide down a ramp into a tray.

A real-time clock is used to keep track of time for scheduled treat dispensing.

The prototype is made of cardboard and popsicle sticks, which is suitable for demonstration but not for actual pet use due to slobber.

For home use, the dispenser should be made of washable materials or placed out of the pet's reach.

The Arduino program can be customized to train or reward pets for specific behaviors using various sensors.

An LCD screen is used for displaying time and instructions, but it's optional if not needed.

A potentiometer is included to adjust the contrast on the LCD screen.

The circuit includes a reset button, LED, and buzzer, which can be used to alert the pet when a treat is dispensed.

The video provides an overview of the parts and their functions rather than individual connections.

Arduino's compatibility with a wide variety of sensors allows for customization of the treat dispenser for different behaviors.

The video includes a demonstration of the code for dispensing treats at certain times using the real-time clock.

The code includes libraries for the Servo and Liquid Crystal display, and uses variables for time tracking.

The setup function in the code initializes the pins, servo, and LCD display.

The loop function updates the LCD, checks the time, and controls the servo to dispense treats at specified intervals.

The code includes a mechanism to reset the dispenser after all treats have been dispensed.

Additional functions are provided to flash an LED and sound a buzzer, and to update the LCD screen with the current time.

Detailed instructions, parts list, and circuit diagram can be found in the video description for those interested in building the project.

Transcripts

play00:00

in this video I'll show you how to build

play00:02

an automatic dog treat dispenser using

play00:04

an Arduino you can program it to

play00:06

automatically dispense treats at certain

play00:08

times of day react to sensors that

play00:11

detect your dog's presence or even train

play00:13

your dog to push a

play00:15

button here's how the device works the

play00:18

compartments in this Hopper up at the

play00:19

top are preloaded with the food or

play00:21

treats a Servo motor rotates the

play00:24

compartments one at a time the Arduino

play00:27

uses a real-time clock to keep track of

play00:29

the time and for the sake of

play00:30

demonstration in this video I have the

play00:32

motor program to rotate once every 15

play00:34

seconds although for a real project you

play00:36

would probably space that out much

play00:37

further throughout the day as each

play00:39

compartment rotates it goes over this

play00:41

hole in the cardboard so the treats can

play00:43

slide down a ramp into a tray at the

play00:45

front now obviously this whole thing is

play00:48

just made out of paper so that works

play00:49

well for a demonstration at a science

play00:51

fair but it would not be good for your

play00:53

pet to eat out of this directly because

play00:54

the slobber would pretty quickly ruin

play00:56

the paper so if you want to use this for

play00:58

real at home you can either place it up

play01:00

high on a counter or a shelf where your

play01:02

pet can't reach it so it can drop the

play01:04

treats down below or you would have to

play01:06

build something out of sturdier more

play01:08

washable

play01:09

materials after it has rotated all of

play01:11

the way and dispensed all of the treats

play01:14

on the next cycle I will get a

play01:15

notification to press the button to

play01:17

reset at which point it will rotate back

play01:19

to its original position and I can load

play01:21

it up with treats for the next

play01:28

day let's take a look at the mechanical

play01:31

design if we pop the servo horn off the

play01:34

motor you can see that I have made the

play01:36

compartments just by gluing together

play01:37

popsicle sticks at roughly 45ยฐ angles to

play01:40

make four different compartments but of

play01:42

course you could space them out

play01:43

differently to make a different number

play01:45

of compartments those are hot glued to

play01:48

the servo horn which presses on to the

play01:51

motor shaft here the servo motor itself

play01:53

has the shaft sticking through a hole

play01:55

cut in the cardboard but the motor is

play01:57

glued to the underside of the cardboard

play02:00

I've made legs to hold the platform up

play02:02

just out of rolled up tubes of card

play02:04

stock and also made this ramp out of

play02:07

card stock and taped it on to come down

play02:09

into the tray at the bottom again all of

play02:11

that works as a demonstration or if you

play02:13

are using this for humans for something

play02:15

like to dispense medication or candy

play02:17

that isn't going to get the paper messy

play02:19

but you would not actually want to use a

play02:21

paper tray for your pet to eat out of

play02:23

you would either want to make this out

play02:24

of washable material or again put it up

play02:26

high where your pet can't get to it so

play02:28

the treats drop down below

play02:30

let's zoom in to take a look at the

play02:32

circuit now this is kind of a messy busy

play02:35

circuit on the breadboard here so it's

play02:37

hard to see all of the connections in

play02:38

this video but you can go to the link in

play02:40

the description to get a much cleaner

play02:42

version of the circuit diagram along

play02:43

with a parts list if you would like to

play02:45

build this yourself so here I'm just

play02:47

going to go through an overview of the

play02:49

parts and what they're for rather than

play02:50

going through each individual connection

play02:53

so we have a potentiometer that adjusts

play02:55

the contrast on the LCD screen the LCD

play02:58

screen is really only necessary if you

play03:00

want a readout of a time and the

play03:02

instructions like press a button to

play03:03

reset you don't need the screen if you

play03:06

don't care about that a lot of these

play03:07

connections are for the screen going

play03:09

over to the Arduino I have that reset

play03:12

button and then I also have an LED and a

play03:14

buzzer that were not used in my

play03:16

demonstration but for example if you

play03:18

wanted to sound a buzzer to alert your

play03:21

pet that the treat has been dropped you

play03:23

could use the buzzer as

play03:25

well now I have this demonstration

play03:27

program to dispense treats automatically

play03:29

at certain times but the great thing

play03:31

about using an Arduino is that they are

play03:33

compatible with such a wide variety of

play03:35

sensors so for example if you want to

play03:38

train or reward certain Behavior this

play03:41

lets you customize your treat dispenser

play03:43

to do that automatically you can use

play03:45

anything from a motion detector to a

play03:48

distance sensor that will measure how

play03:50

far your pet is in front of something to

play03:53

a magnet sensor that can detect a

play03:55

magnetic tag on their collar so there

play03:57

are lots of different ways you can

play03:59

detect your pets presence you could

play04:01

teach them to touch something so pets

play04:04

don't have fingers like humans it's a

play04:06

little hard for them to push buttons on

play04:07

a breadboard like this but you could buy

play04:09

a larger button teach your pet to press

play04:12

the button you could use a microphone to

play04:14

detect sound there are tons and tons of

play04:16

options for how you can customize this

play04:19

project so rather than showing you all

play04:21

of those different options in this video

play04:23

what I'm going to do is switch over to

play04:25

the computer and demonstrate the code

play04:26

for dispensing the treats at certain

play04:29

times but you can find tutorials for all

play04:31

of these different sensors in our

play04:34

Arduino tutorial playlist Linked In the

play04:36

description of this video and you can

play04:38

then customize the code to use a

play04:40

different sensor if you want but for now

play04:42

let's switch over to the computer and

play04:44

take a look at the code for dispensing

play04:46

the treats at certain times using the

play04:48

real-time clock here's the code remember

play04:51

that you can download it from the link

play04:53

in the description and you may need to

play04:54

modify it depending on the changes and

play04:56

customizations you make to your treat

play04:58

dispenser so going through this line by

play05:01

line at the top here we include several

play05:03

libraries you need the servo library to

play05:06

control the servo you only need the

play05:08

Liquid Crystal Library if you are going

play05:10

to include that liquid crystal display

play05:13

and I should note that I am using an

play05:14

Arduino Uno R4 Minima here which has a

play05:18

builtin realtime clock if you are using

play05:21

a separate external realtime clock

play05:24

module we have a tutorial for an

play05:26

external module from Adafruit Linked In

play05:27

the description of this video in our

play05:29

playlist

play05:30

then the code will be different the code

play05:31

in this video is specific to the

play05:33

internal RTC on the Arduino R4 Minima we

play05:38

then create a Servo object that we are

play05:40

going to refer to using the servo

play05:42

Library I defined some constant

play05:44

variables for the pins I have different

play05:47

things connected to and some other

play05:50

variables for keeping track of the angle

play05:52

the state of the button if you use one

play05:55

and some delays to slow the servo down

play05:58

and debounce or wait if you are using

play06:01

the button so you don't accidentally

play06:03

detect multiple button presses if you

play06:05

hold the button down I also have time

play06:08

variables for keeping track of the

play06:10

different units of time year month day

play06:13

hour minutes and seconds that is

play06:15

assuming you are using the realtime

play06:16

clock again if you going to modify the

play06:18

code to make the motor react to a sensor

play06:21

instead then you don't need to keep

play06:23

track of the time and you don't need to

play06:24

worry about those there is some code

play06:27

based on the LCD Library to tell the

play06:31

display which pins you are using to

play06:33

communicate with the Arduino again so

play06:35

you only need this part if you are using

play06:37

that liquid crystal display and then we

play06:39

get into the setup function where I have

play06:42

pin mode commands to set different pins

play06:44

as inputs or outputs for example the

play06:46

button is an input the LED and the

play06:49

buzzer are outputs and we tell it which

play06:52

pin the servo is attached to set the

play06:55

initial angle for the servo and

play06:58

initialize serial communication

play07:00

which is always useful for

play07:02

debugging we set up the size of the LCD

play07:05

the number of columns and rows and then

play07:08

here is code to initialize the time for

play07:10

the real-time clock and again this code

play07:12

is unique to the built-in real-time

play07:15

clock on the Arduino Uno R4 Minima where

play07:18

you have to manually set the time right

play07:21

before you upload the code so there are

play07:23

other third party modules that will

play07:25

automatically get the time when you

play07:27

compile and upload the code here you

play07:29

need to to remember to change this each

play07:31

time you upload if you want it to be

play07:32

accurate but again if you were using a

play07:34

different realtime clock module this

play07:37

code will be

play07:38

different in the loop function I call a

play07:41

function that is going to update the LCD

play07:43

screen I will show you that later we

play07:45

print the angle of the servo to the

play07:47

serial monitor that is useful for

play07:49

debugging and then here is really the

play07:52

key part of the program so here is where

play07:54

I am detecting certain times so I have

play07:57

an if statement that says if seconds

play08:00

equals 0 or that's what this double

play08:03

vertical bar here means seconds equal 15

play08:06

or seconds equals 30 or seconds equals

play08:09

45 so I this isn't necessarily the most

play08:12

efficient way to do this I could have

play08:14

divided by 15 and checked the remainder

play08:16

or something but instead I just wrote

play08:18

out all four possible conditions so I

play08:21

going to rotate the servo once every 15

play08:24

seconds and this condition is what you

play08:27

would change either if you are using the

play08:29

real time clock and you want to make

play08:31

this happen at different times of day

play08:34

for example if you want to detect 9:00

play08:36

a.m. you could write 9 and that's the

play08:39

double Amper standand here minutes

play08:41

equals z and seconds equals z so you

play08:44

probably don't want to give your pet

play08:46

treats every 15 seconds you would want

play08:48

to change this to maybe dispense meals

play08:50

twice a day or something like that so

play08:52

again this is just for purposes of

play08:55

demonstration for what I'm doing in this

play08:56

video you need to change this to the

play08:59

times of of day you want to dispense the

play09:01

treats or if you are not going to use

play09:04

the real-time clock at all you are going

play09:05

to use other sensors instead then you

play09:08

would need to add your code up here to

play09:11

read values from Those sensors and

play09:13

change the condition in this if

play09:15

statement to depend on those sensor

play09:17

readings again I am not going to

play09:19

demonstrate that in this video because

play09:21

we have tutorials for many different

play09:23

sensors Linked In Our playlist in the

play09:25

description of this video so you can go

play09:27

check out those videos to learn how to

play09:29

use different

play09:30

sensors so whatever this condition is

play09:33

whether it's the realtime clock or

play09:34

something else assuming that condition

play09:36

is true then inside this if statement

play09:38

we're going to set the new angle

play09:41

variable equal to the current angle plus

play09:43

the angle increment or then going to

play09:45

check as long as that new angle is less

play09:48

than

play09:48

180ยฐ we are going to slowly increase the

play09:52

servo angle to the new position using

play09:54

this WOW Loop so if you just use a

play09:57

single Servo right command to go to the

play09:59

new angle the servo motion will be very

play10:01

fast and jerky and that's probably not

play10:04

good so instead we use a while loop to

play10:06

just increase the angle 1ยฐ at a time and

play10:10

include a short movement DeLay So that

play10:12

lets us slow the servo down so we keep

play10:16

going until the angle reaches the new

play10:18

angle and we've moved the servo to the

play10:20

next position but note that there is an

play10:22

else statement here and that will detect

play10:25

if the new angle is actually greater

play10:27

than 180ยฐ then that means we can't

play10:30

rotate any further and we are going to

play10:32

reset to the initial position so we have

play10:35

another while loop that does the same

play10:38

thing except this time we are decreasing

play10:41

the angle by 1ยฐ at a time until it

play10:44

equals zero and again we have a delay in

play10:46

there to slow the servo motion down so

play10:48

it is not too jerky so again to recap

play10:51

the code is going to Loop through here

play10:53

and each time it detects one of these

play10:56

times the seconds is 0 15 30 or 40 5

play11:00

it's going to increase the angle by my

play11:02

angle increment variable which I should

play11:04

have mentioned if I scroll back up I

play11:06

have set to 45ยฐ in this program because

play11:09

I built a hopper with four compartments

play11:12

but if you have more compartments you

play11:14

could decrease this angle to move in

play11:17

smaller increments or if you only have

play11:19

two compartments for example you would

play11:21

increase this to 90 because the servvo

play11:23

has a range of 180ยฐ so if you build

play11:26

something with a different number of

play11:28

compartments you would need to adjust

play11:29

this angle accordingly so I'm going to

play11:32

Loop through each time I detect one of

play11:34

these times I increase that angle and

play11:36

then once I've gone through the full

play11:38

180ยฐ range I'm going to reset back to

play11:40

the initial position I have a weit for

play11:44

button press built in here before it

play11:46

will start again so we display a press

play11:49

button to restart message on the screen

play11:53

and then we have this single line wow

play11:55

Loop where the code is just going to get

play11:57

stuck in this Loop until I press the

play11:59

buttons so digital read button pin

play12:02

equals low will be true when the button

play12:04

is not pressed so the code will just be

play12:07

stuck in this W Loop that does nothing

play12:09

but the moment I press that

play12:11

button this statement will become false

play12:14

because digital read button pin will

play12:16

equal high so this statement will now be

play12:18

false it will break out of the loop

play12:21

clear the screen and keep going I then

play12:24

have two more functions down here that

play12:26

just help me keep the code in my Loop a

play12:27

little cleaner one is an optional

play12:30

function to flash the LED and sound the

play12:33

buzzer when the motor moves so if you

play12:35

want an audible alarm so you alert your

play12:38

pet to the food being dispensed you

play12:39

could use the buzzer for that so this is

play12:42

a loop that just blinks the LED and the

play12:44

buzzer on and off a certain number of

play12:46

times you can call that function from up

play12:49

here if you want to do it where the

play12:50

inputs are the number of flashes and the

play12:52

delay or duration of each Flash in

play12:55

milliseconds but I have that commented

play12:57

out because I didn't want to use it in

play12:59

in this video I then also have a

play13:01

function for getting the time and

play13:03

updating the LCD screen so I'm not going

play13:06

to go through this in too much detail

play13:07

because we have separate tutorials about

play13:09

the realtime clock and the LCD but I get

play13:13

the time from the Clock Store the time

play13:16

in these different variables that I

play13:18

created earlier and then have a bunch of

play13:21

LCD print commands first to print the

play13:24

month day and year although you could

play13:26

rearrange that for different date

play13:28

formats and and then to print the time

play13:30

in hour minutes seconds

play13:33

format remember that for written

play13:35

instructions for this project including

play13:36

the parts list circuit diagram and

play13:38

example code you can check out the link

play13:40

in the video description for over a

play13:42

thousand other projects in all areas of

play13:44

Science and Engineering check out our

play13:46

YouTube channel and our website

play13:49

www.sciencebuddies.org

Rate This
โ˜…
โ˜…
โ˜…
โ˜…
โ˜…

5.0 / 5 (0 votes)

Related Tags
ArduinoDog TreatsAutomated DispenserDIY ProjectPet CareSchedulingSensorsReal-TimeEngineeringInnovation