Open shattered97 opened 4 years ago
The requirements are vague for a reason. Ask questions, this is how you will get most of your software requirements.
The stepper motor and the servo will be coded similar but the servo is easier to work with.
I did not cover how to use a switch on purpose, make sure you account for switch debounce. I will answer questions the switch piece is designed for you figure out on your own. It is not easy but not too hard.
This is designed mirror the camera project goals using simpler hardware for the first time.
@shattered97 Do you want me to stop at the first difference detected or at the end of a scan if any difference is detected? Is there a certain length of time that you want me to wait on the debounce? Is there a set number of data points that you would like to see for each pass?
@shattered97 Once the button is pushed, should the new distance be added to the map?
@JetstreamDev Order should go as follows:
Start at position 1: Read the distance in front of the sensor. Save that distance in the map as position 1.
Move to position 2: Read the distance in front of the sensor. Save that distance in the map as position 2.
Repeat this until you have covered 180 degrees.
This is your base map. You have read the field in front of you and stored everything in a map.
Now you move into a search mode.
You start at position one, read the distance and compare to your base map.
If equal nothing moved go to the next the position
If not equal update the new position in the start map turn on a light because something moved.
Wait until the user acknowledges the move, then continue to the next position
The goal here is not to worry about time, just the concept of how to track an object(s) that is infront of your sensor.
x
x
x
servo with ultrasonic sensor
@JetstreamDev
The debounce is for you figure out.
https://www.arduino.cc/en/Tutorial/Debounce
@JetstreamDev You are building a static map. As for when and how to do specific you as the developer get to choose how to do this. You will be given requirements and how you get this is up to you.
You do not have to follow any of my suggestions you have a better way. The requirements are
Build a static map of the things in front of you.
Check if something has moved in front of you by comparing it too your static map.
You can wait for user input before going on.
When the LED light is off the static map should reflect the current distance of any objects in front of it.
Ignore time... Do not try to do this in real time just work on looking in front of your sensor and saving those object positions, then scan again to see if anything moved.
This is what we are going to do with the Radio beacon.
Camera will start at a starting positioning.
The left radio receiver will read the signal strength of the beacon.
The right radio receiver will read the signal strength of the beacon.
The goal will to be get the two signal strengths equal (or close). This means beacon is centered between the two receivers.
There are several ways of doing this, and my testing will determine the best way.
Using your knowledge of the servo, LEDs and ultra sonic sensor. Build a sudo radar system with the following requirements.