Example code 12

Dependencies:   mbed-rtos mbed

Fork of STMNucleoF401RE_ExampleCode_12_ServoMotor by 20161020-Corso Rapid Prototyping with STM32Nucleo

Circuito

/media/uploads/perlatecnica/servomotorepotenziometro.png

Revision:
4:bb8f5479e46c
Parent:
3:b1a16fe3265f
diff -r b1a16fe3265f -r bb8f5479e46c main.cpp
--- a/main.cpp	Mon Feb 29 15:04:49 2016 +0000
+++ b/main.cpp	Fri Apr 29 14:16:40 2016 +0000
@@ -36,7 +36,7 @@
 void runmotor_threadfunc(void const *args) {
     while(true){
       meas = analog_value.read(); // Reads the analog input value (value from 0.0 to 1.0)
-      printf("measure = %.2f mV\r\n", meas);
+      printf("measure = %.2f \r\n", meas);
       //printf("pwm set to %.2f %%\r\n", mypwm.read() * 100);
       dutycycle = meas*2/1000;
        // Set PWM period