quentin godbert
/
t2-stm32_thread
avec thread
Fork of T2_STM32 by
Diff: Cylinder.h
- Revision:
- 4:b01a3ce6ef01
- Parent:
- 3:dfbd0ce2963a
diff -r dfbd0ce2963a -r b01a3ce6ef01 Cylinder.h --- a/Cylinder.h Sun Jan 14 15:56:09 2018 +0000 +++ b/Cylinder.h Sun Jan 14 17:39:09 2018 +0000 @@ -97,10 +97,17 @@ } void Cylinder::Origin(int OriginSensor) { - digitalWrite(sdirPin, LOW); - analogWrite(sstepPin, 127); - while (digitalRead(sOriginSensor) == true); - analogWrite(sstepPin, 0); + + int periode = 100; + DigitalOut test_sortie_pwm(PD0); + SendPWM_Carre(periode, test_sortie_pwm) + while(DigitalOut(OriginSensor)==true); + SendPWM_Nul(test_sortie_pwm); + //digitalWrite(sdirPin, LOW); + //analogWrite(sstepPin, 127); + //while (digitalRead(sOriginSensor) == true); + //analogWrite(sstepPin, 0); + */ } #endif \ No newline at end of file