Question
So I'm new to arduino, and I am working on a project for school and I was wondering if I am correct in my wiring
So I'm new to arduino, and I am working on a project for school and I was wondering if I am correct in my wiring and coding.
The premise of the project is an automatic pet feeder. Basically, a pet will come close, (around 25cm), and an ultrasonic sensor will read that distance. With that distance, it will then go through a check with a pressure sensor (for food) and a water level sensor (for water). If the pet is within the distance, and there is not enough pressure in the bowl, a servo motor is activated to spin an attachment (a corkscrew) that dispenses food until the desired pressure is reached. The same is true with the water level sensor, but this time, if there is not enough water (i.e. the water level is low), then a water pump will dispense water into the bowl until the correct amount.
Again, I just want to know if I am correct with my coding and wiring set up. I have attached a photo of my physical set up, and a whiteboard drawing I did to try and make it clearer. (I also made it in thinker cad)
Here is the image for the code;
The help would be great! Also, if possible, could you let me know how to make the servo motor spin continuously? Or is my code already doing that? Again, I am fairly new to this and kinda going in blind.
Again, thank you so much for the help! I'll make sure to rate the answer! (It might be tomorrow morning because I may be asleep, but I will make sure to do it!)
UNO 852 298-0000000000
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started