I'm working on an App for my final year project. I want the servo motor turn ON at specific time (for an example at 9am). I already go through some tutorial about schedule time but mostly used time picker. Is it a must to use time picker for this case? In my app, the user will have 3 option 3 pick (morning/evening/night) with a specific set of time (9am/3pm/9pm). I have given the interface below.
Not clear. Does that mean that it is possible within the hour (ie from 9:00 to 9:59) or only at exactly 9:00? Or does "Morning" mean between 9 am and 3 pm?
No, you can have clickable image, as you have provided in image above. When, morning image is clicked, map it to 9AM, and when evening is clicked, map to 4PM, and night to 9PM. Send your selection to Servo via Arduino to open pet feeding door.
Yup I have already turn on the clickable image option. About the selection of servo, do I need to write the selection code via Arduino first? Or just manage the selection via mit app? Because the user supposed to select the option based on the app right?
I have already look through this one but I seems cannot understand. At the link you share, it seems that user can change the date or it is fixed? I'm confused.Any action at fixed time
I try look at this one but it also got me confused on how it will work.
Yes, it would be convenient, and I think, it is the flow, to instruct Arduino via application, and you may include, Real-Time Clock Module. With your application, you would be able to send a specific time, lets say, 9AM, now it is job of microcontroller to execute task at that specified time.
In the example, the date is fixed, however it is possible to write code using more Blocks to change the time or date. Set the date/time to anything you want. Even multiple times during a day.
The example does not run in the background. It either needs to be running or you should use a StayAwake routine to force the app to stay on continuously or use an extension to make the code run in the foreground or background continuously.
To understand how either example works; build the example and run the code then adapt the code to do what you want. Only you can determine whether the basic code is suitable for your project.
At the beginning, I thought the same concept as you. But my lecturer suggest me to use the system time which is already in the phone/app which can help me to reduce the cost of my project.
But, my question is why do you want to keep feeding MCU with phone system time, once you have send a fixed time to Microcontroller then you can relax, since rest will be handled by MCU, and your app can only need to be in picture when you decide to set new time, from 9AM to 3PM.
I do not think so. Did you try it? I suspect it will not run.
Here is how to determine the time the servo should be on. For your purposes, you need lots more code to interface to your arduino. Sorry, I cannot help you with that.