Integrating servo with Bluetooth module

Im trying to control a servo motor with bluetooth and i want to integrate an already code with bluetooth as its on and off method

CODE:

#include <Servo.h>
Servo myservo;
#include <EEPROM.h>

/** the current address in the EEPROM (i.e. which byte we're going to write to next) **/

int pos = 0; // variable to store the servo position

void setup() {
myservo.attach(7); // attaches the servo on pin 9 to the servo object
}

void loop() {

for (pos = 90; pos <= 120; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(150); // waits 15 ms for the servo to reach the position
}
for (pos = 121; pos >= 90; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(50);
}

}

Use the </> tags for code:
```
Serial.println("Hello World!");
```
Looks like this:

Serial.println("Hello World!");

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

You can go back and fix your original post by highlighting the code and clicking the </> in the menu bar.
code tags new

There is a great deal of important information needed before we can help you.

What Arduino board are you using?

What Bluetooth module are you using?

What servo are you using?

What Bluetooth device will be talking to the Arduino with a Bluetooth module and servo attached?

How is the servo to be powered? Hint, from the Arduino is a wrong answer.