Hi Abhishek! First of all what type of motor do you use and what is your hardware to drive it? Do you have a schematic? Furthermore there are a few things in your code that you should change - the delay function's prototype should not be inside of your main. Doesn't the compiler complain? Then how long is the delay when calling the function with a value of 10? Maybe too short to see anything at all? Anyway...without a hardware diagram it is not really possible to tell you if the code will work as expected. And keep in mind that your program is a single shot one - you do not have an endless loop, so it will be executed only once. Dennis
↧