How would i call a function or subroutine im still trying to figure this out.
Can_challenge.ino (1.33 KB)
How would i call a function or subroutine im still trying to figure this out.
Can_challenge.ino (1.33 KB)
You seem to be managing to call pinMode(), digitalWrite() and pulseIn() OK but your forward function looks a little sparse.
Which function are you having trouble calling ?
You call the turn_left and ultrasonic functions correctly in loop(). But I don't know what you're trying to do with them in setup().
Then you have a line "void forward" which makes no sense and messes up everything after it.
It's difficult to work out what your program is trying to do.
Steve