Simple "Path Following Code"

I have a simple path following code can't test it out myself because I do not have enough wires as they have been delayed in shipping. I wanted to know if this code will actually work. I have attached a fritzing diagram as well as the code I intend to use.

IR_second_iteration.ino (977 Bytes)

If you need wires for a moving device, block up your device and make the path move and monitor the device response. You can surely make a path simulation on paper or ?

Paul

I'm not sure I understand what you mean. What do you mean by block up my device? How would I block up my device?

I need wires to connect my IR sensors to the Arduino.

mdansani:
I'm not sure I understand what you mean. What do you mean by block up my device? How would I block up my device?

I need wires to connect my IR sensors to the Arduino.

Path following infers movement, wheels, etc. Your post seems to relate to a moving robot, etc. So, if wires keep it from moving along a path, move the path and let the wheels spin.

Are you saying you can't find wire?

Paul

Yes I do not have enough wires to connect the IR sensors. So there is no way of testing until I get them.

I am just trying to be proactive to see if there are any bugs with the code before I get a chance to test them.

I'm very new to coding so I really don't know how to spot errors till I actually run the code.

I don't think the 9v battery will run the servos very long, might want to start looking for a larger battery tray - maybe 5xAA batteries

Run the code without the IR sensors. What happens?

Run the code without the IR sensors, but add code to produce what the sensors might produce. What happens?

If the produced results do mot match your expectations with the simulated IR results, then there are code problems you need to find and repair.

Lack of wires is no reason not to test the rest of your code.

Paul

The code will do something. It most likely won't do what you want, because of the arbitrary numerical constants that you have chosen, like "88", and whether you have the sensor response the right way around.

So wait until you have all the pieces you need, then test it.