Make the motor turn

I am trying to get a motor to turn one turn and when a magnet is sensed on the spindal, the motor will then stop. Repeat.
Sparkfun Pro Micro 5V/16Hz. The sketch has an error when compiling.

--CODE--
//===================== B L O O M ===========================
//A TEST SKETCH FOR SETTING UP A FLIPBOOKIT SMART DUINO
#define SHORT_PAUSE 2000 //a respite after it runs a few times (short_cycle) 1000 = One second
int sensePin_1 = 2; //Hall Effect sense start/end point
int pwm_1 = 6; //motor 1
int i;
void setup()
{
pinMode(pwm_1, OUTPUT);
pinMode(sensePin_1, INPUT);
digitalWrite(sensePin_1, HIGH);
Serial.begin(9600);
}
void loop()
{
OneTurn(pwm_1 ,sensePin_1, 235);
delay (SHORT_PAUSE);
}
void OneTurn(int channel_a, int check, int chA_pwr)
{
for (i=8; i>1; iā€“)
{
analogWrite(channel_a, chA_pwr);
delay(40);
analogWrite(channel_a, 0);
delay(100);
digitalRead(check);
}
while (digitalRead(check) == 1)
{
digitalRead(check);
analogWrite(channel_a, chA_pwr);
delay(40);
analogWrite(channel_a, 0);
delay(100);
digitalRead(check);
}
}
--CODE END--

--ERROR--

sketch_aug25a:21: error: stray '' in program
sketch_aug25a.ino: In function 'void OneTurn(int, int, int)':
sketch_aug25a:21: error: expected )' before 'u2013' sketch_aug25a:21: error: 'u2013' was not declared in this scope sketch_aug25a:21: error: expected ;' before ')' token
--ERROR END--

I would appreciate if someone has an answer to this. I would think it something pretty basic.
Rich

sketch_aug25a:21: error: stray '\' in program

This error often popup when you copy your code from a web page. It mean you got some crappy character in the code. Let me check.

Yes exactly, I copied you code in a HEX editor and you got some thing wrong on this line:

for (i=8; i>1; iā€“)

Remove the "ā€“" and put i-- instead. Cause at first view this iā€“ is not like i-.From then you code run on my IDE so it should also run on yours

2 mistakes on the same line humm!!! Maybe you should report the thing at : http://flipbookit.com/build/smart-duino/

for (int i=8; i>1; i-- )

Also, declare i in your for loop as well, not at the beginning of your sketch. While it'll work fine, if you try and use i again in another for loop, it'll still contain the old values, whereas defining it in the for loop means it'll be "erased" once the for loop is finished (not in the same scope as the rest of your sketch).

for (int i=8; i>1; i--)

It works well. THank you so much for the replies. I will be more careful with the copy/paste as that is exactly what it did!

I will report this on the flipbookit.com site as well.

Rich