Im new to arduino and have been set the task of turning a stepper motor one way for 180 ̊ then the other way back to its original position when the motor reach 180 ̊. An indicator LED should be turned on from and to 170 ̊(170 ̊ to 180 ̊,180 ̊ to 170 ̊). Using a BNO055 - I2C congiguration. What is my code missing to ensure the LED turns on at the right moments and the correct rotations occur. Thanks
Second post and making the same mistake on both.
Please read this:- How to use this forum
Because your post is breaking the rules about posting code. It will also give you hints on how to ask a question here and what information you need to include. Pay particular attention to how to post clickable links.
Im new to arduino and have been set the task
This normally means this is your homework you want us to do.
Grumpy_Mike is simply explaining what you need to do to get help, he is correct. I think your professor wants you to learn and not have somebody solve the problem for you. Why not start by defining the problem with specifications including a flow chart and schematic (your prof would love it). Define what is the expected outcome. Purchase the Arduino cookbook and read it, this will give you some basics. also use the online tutorials and videos available, there are many good ones on this web site. At this point you will be able to define the problem and may have already solved it.
Please read the post at the start of any forum , entitled "How to use this Forum".
OR http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?