Problem with ping sensor in stepper robot program

Hi
I am new to this and have tried to add a ping sensor into an existing program
Error message - “turn left” was not described in this scope
Can you help please as I have tried everything
worked ok before adding Ping sensor

bumper_and_pin_robot.ino (6.77 KB)

Try using Ctrl-T to format the code properly and you will see that you have messed up the braces{}. Because of that you're trying to define functions inside another function and that doesn't work. Go back to the original code and see where loop() starts and ends and that should show you what's wrong.

Steve

Thanks
The control T tip was great, but still cannot get to the bottom of it.
The challenge of resolving this is a good way to learn.

briantaylor55:
The control T tip was great, but still cannot get to the bottom of it.
The challenge of resolving this is a good way to learn.

If you remain stuck post the latest version of your program in your next Reply.

Also post the actual error message.

Be aware that the actual error can be somewhere before (but not after) the point at which the compiler gets stuck.

...R