Hello everyone, I am doing a project and was wondering if someone could help me out? I understand circuitry great, wiring schematics and plc programming in line diagram forms. When it comes to coding this kicks my butt, I don't get it. I combined lots of codes together that I found and got nothing but dozens of error codes. Could anyone help me out? If someone could help me and get a flawness code for me and it works, then if you can then walk thru the code for me so I can understand it, I have a reward for you.
Im using the following
2 Arduino unos
2 IR emitters with different frequencies
2 IR receivers to locate the IR ermitters
2 DC motors
1 Servo motor
1 Ultrasonic sensor
and 1 motor controlling chip for the obsticle avoiding detection
and 4 LED lights
The following is what im looking to do.
RIGHT arduino
1.) Turn on power to the arduino and when power is on the LED on the Arduino board will first turn on indicating ready
2.) IR Receiver #1 on pin #2 sensor starts looking for one of the 2 IR signals given by the IR emitter board on the LEFT.
3.) If no signal one of the dc motors will turn slowly to maneuver the car in a 360 degree turn for 60 seconds or until it locates one of the two IR signals.
4.) When IR receiver #1 pin #2 finds IR signal it lowers the servo motor pin #5 from 90 degrees to 0 degrees.
5.) IR receiver #2 on pin #3 which is inside the arm attached to the servo motor then activates by sensing one of the 2 IR signals engages both wheels to move the vehicle forward and attack the IR emitting signal head on.
6.) While moving towards the IR signal the ultrasonic sensor on pin #4 helps avoid any obstacles in its way within 1-3.5 inches (add in there not to retract the arm if signal is lost for 30 seconds.
7.) When the IR emitter is knocked down it stops while it scans for IR signal again as it rotates by spinning one wheel slowly for 20 seconds in a 360 degree as it keeps the arm down for up to 40 seconds once the IR signal is lost. If found then it will attack the other emitting IR signal while the arm is remaining down ( the vehicle cannot move towards the object due to the IR within the arm is what allows the vehicle to move forward therefore the arm shall remain down at 0 degrees). If no IR signal is detected it will rotate for 15 secs then retract the servo arm back to 90 degrees and waits 50 seconds and scans again then follows the previous sequence of attack steps mentioned above. After the last 50 seconds it will shut off until the reset button is pushed. (which I will add one on the bread board with power going in series to a 330 ohm fuse first then the pushbutton switch then to the Analog in #A0).
LEFT arduino
When a pushbutton is pressed (on the left board) it continues the signal turns on a led light bulb indicating power and IR signal emitted and the IR emitter is sending a IR signal.
(The clear LED bulbs in the picture are representing the 2 pin IR emitters I have and will be using)