- #1
Hooke's Law
- 30
- 0
Homework Statement
I want a robot to roll in a path with 4 sides or in other words square, so I made a possible program but I am not sure if it will work. And how do you call 2 source codes into a different code like the one below? ( the 2 are right.hex and the other is DelaySpeed )
right - causes the robot to make a right turn
DelaySpeed - controls the speed of the motor of the robot ( steps / sec )
The Attempt at a Solution
Note: DelaySpeed() and right() are not in the same code. So how do I call the 2 functions in this code?
Fragment of the code :
Code:
int main(){
int n = 0;
while ( n < 5 ){
right();
DelaySpeed();
n++;
}
return 0;
}
Last edited: